01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2006 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id$
23: */
24: package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.wizards;
25:
26: import java.io.File;
27:
28: import org.eclipse.core.resources.IFile;
29: import org.eclipse.core.resources.ResourcesPlugin;
30: import org.eclipse.jface.wizard.IWizard;
31: import org.eclipse.jface.wizard.WizardPage;
32: import org.eclipse.ui.PlatformUI;
33: import org.eclipse.ui.part.FileEditorInput;
34:
35: /**
36: * Base class for New Project creation wizards. Derived from
37: * org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage
38: *
39: */
40: public abstract class PropertyWizardPage extends WizardPage {
41:
42: //abstract public boolean isUseDefault();
43: abstract public void controlToModels();
44:
45: abstract public void modelsToControl();
46:
47: protected PropertyWizardPage(String pageName) {
48: super (pageName);
49:
50: }
51:
52: public PropertyWizard getWizard() {
53: IWizard wizard = super .getWizard();
54: return (PropertyWizard) wizard;
55: }
56:
57: protected File oldWSDLExist(String componentName) {
58:
59: FileEditorInput editorInput = (FileEditorInput) PlatformUI
60: .getWorkbench().getActiveWorkbenchWindow()
61: .getActivePage().getActiveEditor().getEditorInput();
62:
63: String projectName = editorInput.getFile().getProject()
64: .getName();
65:
66: IFile folder = ResourcesPlugin.getWorkspace().getRoot()
67: .getProject(projectName).getFile(
68: "src/wsdl/" + componentName);
69: if (folder.getLocation().toFile().exists()) {
70: File file = new File(folder.getLocation() + "/"
71: + componentName + "_Server.wsdl");
72: if (file.exists())
73: return file;
74: else
75: return null;
76: }
77: return null;
78: }
79:
80: }
|