JBoss Tools SVN: r19930 - trunk/seam/plugins/org.jboss.tools.seam.ui.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-01-26 09:39:30 -0500 (Tue, 26 Jan 2010)
New Revision: 19930
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-5729
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2010-01-26 12:47:17 UTC (rev 19929)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2010-01-26 14:39:30 UTC (rev 19930)
@@ -206,7 +206,7 @@
</possibleChildren>
<actionProvider
class="org.eclipse.ui.internal.navigator.resources.actions.EditActionProvider"
- id="org.eclipse.ui.navigator.resources.actions.EditActions">
+ id="org.jboss.tools.seam.ui.resources.actions.EditActions">
<enablement>
<or>
<adapt type="org.eclipse.core.resources.IFile" />
@@ -216,7 +216,7 @@
</actionProvider>
<actionProvider
class="org.eclipse.ui.internal.navigator.resources.actions.RefactorActionProvider"
- id="org.eclipse.ui.navigator.resources.actions.RefactorActions">
+ id="org.jboss.tools.seam.ui.resources.actions.RefactorActions">
<enablement>
<or>
<adapt type="org.eclipse.core.resources.IFile" />
@@ -271,7 +271,7 @@
<actionProvider
class="org.eclipse.ui.internal.navigator.resources.actions.NewActionProvider"
- id="org.eclipse.ui.navigator.resources.NewActions">
+ id="org.jboss.tools.seam.ui.resources.NewActions">
<enablement>
<or>
<adapt type="org.eclipse.core.resources.IResource" />
15 years, 11 months
JBoss Tools SVN: r19929 - in trunk/esb/plugins/org.jboss.tools.esb.ui: src/org/jboss/tools/esb/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-01-26 07:47:17 -0500 (Tue, 26 Jan 2010)
New Revision: 19929
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/NewActionWizard.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUIMessages.java
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-5591
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2010-01-26 12:46:25 UTC (rev 19928)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2010-01-26 12:47:17 UTC (rev 19929)
@@ -20,6 +20,18 @@
Create a ESB XML File
</description>
</wizard>
+
+ <wizard
+ category="org.jboss.tools.esb.ui"
+ class="org.jboss.tools.esb.ui.wizard.NewActionWizard"
+ icon="images/esb16.gif"
+ id="org.jboss.tools.esb.ui.wizard.NewActionWizard"
+ name="ESB Action"
+ project="false">
+ <description>
+ Create a ESB Action Java File
+ </description>
+ </wizard>
</extension>
<extension id="e" name="XML Editors" point="org.jboss.tools.common.model.ui.xmlEditor">
@@ -41,6 +53,8 @@
class="org.jboss.tools.esb.ui.editor.form.ESBActionForm"/>
<xclass id="org.jboss.tools.esb.ui.wizard.AddGenericActionStep"
class="org.jboss.tools.esb.ui.wizard.AddGenericActionStep"/>
+ <xclass id="org.jboss.tools.esb.ui.wizard.NewActionWizard"
+ class="org.jboss.tools.esb.ui.wizard.NewActionWizard"/>
</extension>
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUIMessages.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUIMessages.java 2010-01-26 12:46:25 UTC (rev 19928)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/ESBUIMessages.java 2010-01-26 12:47:17 UTC (rev 19929)
@@ -21,6 +21,8 @@
}
public static String ESB_UI_PLUGIN_NO_MESSAGES;
+ public static String newESBActionWizardTitle;
+ public static String newESBActionWizardPageTitle;
static {
NLS.initializeMessages(BUNDLE_NAME, ESBUIMessages.class);
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/messages.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/messages.properties 2010-01-26 12:46:25 UTC (rev 19928)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/messages.properties 2010-01-26 12:47:17 UTC (rev 19929)
@@ -1 +1,4 @@
ESB_UI_PLUGIN_NO_MESSAGES=No message
+
+newESBActionWizardTitle=New ESB Action
+newESBActionWizardPageTitle=ESB Action
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/NewActionWizard.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/NewActionWizard.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/NewActionWizard.java 2010-01-26 12:47:17 UTC (rev 19929)
@@ -0,0 +1,180 @@
+package org.jboss.tools.esb.ui.wizard;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.common.model.ui.wizards.NewClassWizard;
+import org.jboss.tools.common.model.ui.wizards.NewTypeWizardAdapter;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
+import org.jboss.tools.esb.ui.ESBUIMessages;
+import org.jboss.tools.esb.ui.ESBUiPlugin;
+
+public class NewActionWizard extends NewClassWizard implements INewWizard {
+ boolean openCreatedType = false;
+
+ public NewActionWizard() {
+ setDialogSettings(JavaPlugin.getDefault().getDialogSettings());
+ setWindowTitle(ESBUIMessages.newESBActionWizardTitle);
+ setDefaultPageImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWCLASS);
+ }
+
+ public void addPages() {
+ super.addPages();
+ mainPage.setTitle(ESBUIMessages.newESBActionWizardPageTitle);
+ }
+
+ protected void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException {
+ mainPage.createType(monitor);
+ if(mainPage.getCreatedType() != null) {
+ modifyJavaSource();
+ }
+ }
+
+ @Override
+ public boolean performFinish() {
+ boolean b = super.performFinish();
+ if(b) {
+ if(openCreatedType) {
+ Display.getDefault().asyncExec(new Runnable(){
+ public void run() {
+ try {
+ JavaUI.openInEditor(mainPage.getCreatedType());
+ } catch (CoreException e) {
+ ESBUiPlugin.getDefault().log(e);
+ }
+ }
+ });
+ }
+ }
+ return b;
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ IProject p = getProject(selection);
+ adapter = new NewTypeWizardAdapter(p);
+ adapter.setRawSuperClassName("org.jboss.soa.esb.actions.AbstractActionPipelineProcessor");
+ IPackageFragment f = getPackageFragment(selection);
+ if(f != null) {
+ String name = "";
+ IPackageFragment cf = f;
+ while(cf != null) {
+ if(name.length() == 0) {
+ name = cf.getElementName();
+ } else {
+ name = cf.getElementName() + "." + name;
+ }
+ cf = (cf.getParent() instanceof IPackageFragment) ? (IPackageFragment)cf.getParent() : null;
+ }
+ adapter.setRawPackageName(name);
+ }
+ adapter.setRawClassName("");
+ openCreatedType = true;
+ }
+
+ IProject getProject(IStructuredSelection selection) {
+ if(selection.isEmpty() || !(selection instanceof IStructuredSelection)) {
+ return null;
+ }
+ Object o = ((IStructuredSelection)selection).getFirstElement();
+ if(o instanceof IProject) {
+ return (IProject)o;
+ } else if(o instanceof IJavaElement) {
+ IJavaElement e = (IJavaElement)o;
+ return e.getJavaProject().getProject();
+ } else if(o instanceof IAdaptable) {
+ return (IProject)((IAdaptable)o).getAdapter(IProject.class);
+ }
+ return null;
+ }
+
+ IPackageFragment getPackageFragment(IStructuredSelection selection) {
+ if(selection.isEmpty() || !(selection instanceof IStructuredSelection)) {
+ return null;
+ }
+ Object o = ((IStructuredSelection)selection).getFirstElement();
+ if(o instanceof IPackageFragment) {
+ return (IPackageFragment)o;
+ }
+ return null;
+ }
+
+ void modifyJavaSource() {
+// String newValue = getQualifiedClassName();
+ try {
+ IType type = mainPage.getCreatedType();
+ if(type == null) {
+ return;
+ }
+ String name = type.getElementName();
+ String sc = type.getSuperclassTypeSignature();
+ if(sc != null) {
+ sc = EclipseJavaUtil.resolveTypeAsString(type, sc);
+ }
+ if(type != null && "org.jboss.soa.esb.actions.AbstractActionPipelineProcessor".equals(sc)) {
+ ICompilationUnit w = type.getCompilationUnit().getWorkingCopy(new NullProgressMonitor());
+ IBuffer b = w.getBuffer();
+ String s = b.getContents();
+ String lineDelimiter = "\r\n";
+
+ String IMPORT = "import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;";
+ int i1 = s.indexOf(IMPORT);
+ if(i1 >= 0) {
+ String content = "";
+ String[] imports = {
+ "import org.jboss.soa.esb.actions.ActionProcessingException;",
+ "import org.jboss.soa.esb.helpers.ConfigTree;",
+ "import org.jboss.soa.esb.message.Message;"
+ };
+ for (String is: imports) {
+ if(s.indexOf(is) < 0) {
+ content += lineDelimiter + is;
+ }
+ }
+ if(content.length() > 0) {
+ b.replace(i1 + IMPORT.length(), 0, content);
+ }
+ }
+
+ s = b.getContents();
+
+ int i = s.indexOf('{');
+ int j = s.lastIndexOf('}');
+ if(i > 0 && j > i) {
+ String tab = "\t";
+ String content = lineDelimiter
+ + tab + "protected ConfigTree _config;" + lineDelimiter
+ + lineDelimiter
+ + tab + "public " + name + "(ConfigTree config) {" + lineDelimiter
+ + tab + tab + "_config = config;"+ lineDelimiter
+ + tab + "}" + lineDelimiter
+ + lineDelimiter
+ + tab + "@Override" + lineDelimiter
+ + tab + "public Message process(Message message) throws ActionProcessingException {" + lineDelimiter
+ + tab + tab + "//ADD CUSTOM ACTION CODE HERE" + lineDelimiter
+ + tab + tab + "return message;" + lineDelimiter
+ + tab + "}" + lineDelimiter;
+ b.replace(i + 1, j - i - 1, content);
+ w.commitWorkingCopy(true, new NullProgressMonitor());
+ }
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/wizard/NewActionWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 11 months
JBoss Tools SVN: r19928 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-01-26 07:46:25 -0500 (Tue, 26 Jan 2010)
New Revision: 19928
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/NewClassWizard.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/NewTypeWizardAdapter.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5591
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java 2010-01-26 12:31:41 UTC (rev 19927)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java 2010-01-26 12:46:25 UTC (rev 19928)
@@ -158,8 +158,20 @@
wizardAdapter.addRawInterfaceName(interfacesName[i]);
}
}
-
- NewClassWizard wizard = new NewClassWizard(wizardAdapter);
+
+ NewClassWizard wizard = null;
+
+ XAttribute a = ((DefaultValueAdapter)getPropertyEditor().getInput()).getAttribute();
+ if(a != null) {
+ String cls = a.getProperty("newWizardClass");
+ if(cls != null && cls.length() > 0) {
+ wizard = (NewClassWizard)ModelFeatureFactory.getInstance().createFeatureInstance(cls);
+ }
+ }
+ if(wizard == null) {
+ wizard = new NewClassWizard();
+ }
+ wizard.setAdapter(wizardAdapter);
WizardDialog dialog = new WizardDialog(ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
dialog.create();
int result = dialog.open();
@@ -169,64 +181,64 @@
if(wizard.getContainer() != null) {
wizard.performFinish();
}
- try {
- IType type = EclipseJavaUtil.findType(javaAdapter.getJavaProject(), newValue);
- String name = type.getElementName();
- String sc = type.getSuperclassTypeSignature();
- if(sc != null) {
- sc = EclipseJavaUtil.resolveTypeAsString(type, sc);
- }
- //TODO use interface and register for specific cases. This is new ESB action case.
- if(type != null && "org.jboss.soa.esb.actions.AbstractActionPipelineProcessor".equals(sc)) {
- ICompilationUnit w = type.getCompilationUnit().getWorkingCopy(new NullProgressMonitor());
- IBuffer b = w.getBuffer();
- String s = b.getContents();
- String lineDelimiter = "\r\n";
-
- String IMPORT = "import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;";
- int i1 = s.indexOf(IMPORT);
- if(i1 >= 0) {
- String content = "";
- String[] imports = {
- "import org.jboss.soa.esb.actions.ActionProcessingException;",
- "import org.jboss.soa.esb.helpers.ConfigTree;",
- "import org.jboss.soa.esb.message.Message;"
- };
- for (String is: imports) {
- if(s.indexOf(is) < 0) {
- content += lineDelimiter + is;
- }
- }
- if(content.length() > 0) {
- b.replace(i1 + IMPORT.length(), 0, content);
- }
- }
-
- s = b.getContents();
-
- int i = s.indexOf('{');
- int j = s.lastIndexOf('}');
- if(i > 0 && j > i) {
- String tab = "\t";
- String content = lineDelimiter
- + tab + "protected ConfigTree _config;" + lineDelimiter
- + lineDelimiter
- + tab + "public " + name + "(ConfigTree config) {" + lineDelimiter
- + tab + tab + "_config = config;"+ lineDelimiter
- + tab + "}" + lineDelimiter
- + lineDelimiter
- + tab + "@Override" + lineDelimiter
- + tab + "public Message process(Message message) throws ActionProcessingException {" + lineDelimiter
- + tab + tab + "//ADD CUSTOM ACTION CODE HERE" + lineDelimiter
- + tab + tab + "return message;" + lineDelimiter
- + tab + "}" + lineDelimiter;
- b.replace(i + 1, j - i - 1, content);
- w.commitWorkingCopy(true, new NullProgressMonitor());
- }
- }
- } catch (CoreException e) {
- e.printStackTrace();
- }
+// try {
+// IType type = EclipseJavaUtil.findType(javaAdapter.getJavaProject(), newValue);
+// String name = type.getElementName();
+// String sc = type.getSuperclassTypeSignature();
+// if(sc != null) {
+// sc = EclipseJavaUtil.resolveTypeAsString(type, sc);
+// }
+// //TODO use interface and register for specific cases. This is new ESB action case.
+// if(type != null && "org.jboss.soa.esb.actions.AbstractActionPipelineProcessor".equals(sc)) {
+// ICompilationUnit w = type.getCompilationUnit().getWorkingCopy(new NullProgressMonitor());
+// IBuffer b = w.getBuffer();
+// String s = b.getContents();
+// String lineDelimiter = "\r\n";
+//
+// String IMPORT = "import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;";
+// int i1 = s.indexOf(IMPORT);
+// if(i1 >= 0) {
+// String content = "";
+// String[] imports = {
+// "import org.jboss.soa.esb.actions.ActionProcessingException;",
+// "import org.jboss.soa.esb.helpers.ConfigTree;",
+// "import org.jboss.soa.esb.message.Message;"
+// };
+// for (String is: imports) {
+// if(s.indexOf(is) < 0) {
+// content += lineDelimiter + is;
+// }
+// }
+// if(content.length() > 0) {
+// b.replace(i1 + IMPORT.length(), 0, content);
+// }
+// }
+//
+// s = b.getContents();
+//
+// int i = s.indexOf('{');
+// int j = s.lastIndexOf('}');
+// if(i > 0 && j > i) {
+// String tab = "\t";
+// String content = lineDelimiter
+// + tab + "protected ConfigTree _config;" + lineDelimiter
+// + lineDelimiter
+// + tab + "public " + name + "(ConfigTree config) {" + lineDelimiter
+// + tab + tab + "_config = config;"+ lineDelimiter
+// + tab + "}" + lineDelimiter
+// + lineDelimiter
+// + tab + "@Override" + lineDelimiter
+// + tab + "public Message process(Message message) throws ActionProcessingException {" + lineDelimiter
+// + tab + tab + "//ADD CUSTOM ACTION CODE HERE" + lineDelimiter
+// + tab + tab + "return message;" + lineDelimiter
+// + tab + "}" + lineDelimiter;
+// b.replace(i + 1, j - i - 1, content);
+// w.commitWorkingCopy(true, new NullProgressMonitor());
+// }
+// }
+// } catch (CoreException e) {
+// e.printStackTrace();
+// }
}
dialog.close();
} else {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/NewClassWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/NewClassWizard.java 2010-01-26 12:31:41 UTC (rev 19927)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/NewClassWizard.java 2010-01-26 12:46:25 UTC (rev 19928)
@@ -18,6 +18,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.internal.ui.*;
import org.eclipse.jdt.internal.ui.actions.*;
import org.eclipse.jdt.internal.ui.wizards.*;
@@ -30,21 +31,24 @@
public class NewClassWizard extends Wizard {
- private NewTypeWizardAdapter adapter = null;
- private NewClassWizardPageEx mainPage;
+ protected NewTypeWizardAdapter adapter = null;
+ protected NewClassWizardPageEx mainPage;
public NewClassWizard() {
- this(null);
- }
-
- public NewClassWizard(NewTypeWizardAdapter adapter) {
- super();
- this.adapter = adapter;
setDialogSettings(JavaPlugin.getDefault().getDialogSettings());
setWindowTitle(NewWizardMessages.NewClassCreationWizard_title);
setDefaultPageImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWCLASS);
}
+ public void setAdapter(NewTypeWizardAdapter adapter) {
+ this.adapter = adapter;
+ }
+
+ public NewClassWizard(NewTypeWizardAdapter adapter) {
+ this();
+ setAdapter(adapter);
+ }
+
public void addPages() {
mainPage = new NewClassWizardPageEx();
addPage(mainPage);
@@ -64,7 +68,7 @@
if(p != null && p.length() > 0) c = p + "." + c; //$NON-NLS-1$
return c;
}
-
+
protected void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException {
mainPage.createType(monitor); // use the full progress monitor
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/NewTypeWizardAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/NewTypeWizardAdapter.java 2010-01-26 12:31:41 UTC (rev 19927)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/NewTypeWizardAdapter.java 2010-01-26 12:46:25 UTC (rev 19928)
@@ -67,7 +67,7 @@
// Interface for us
public NewTypeWizardAdapter(IProject project) {
- try {
+ if(project != null) try {
this.javaProject = (IJavaProject)project.getNature(JavaCore.NATURE_ID);
} catch (CoreException e) {
ModelUIPlugin.getPluginLog().logError(e);
15 years, 11 months
JBoss Tools SVN: r19927 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-01-26 07:31:41 -0500 (Tue, 26 Jan 2010)
New Revision: 19927
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelObjectImpl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5591
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelObjectImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelObjectImpl.java 2010-01-26 10:13:59 UTC (rev 19926)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelObjectImpl.java 2010-01-26 12:31:41 UTC (rev 19927)
@@ -19,6 +19,7 @@
import java.util.Properties;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.swt.graphics.Image;
@@ -451,6 +452,8 @@
if(XModelObject.class == adapter) return this;
else if(adapter == IResource.class) {
return null;
+ } else if(adapter == IProject.class) {
+ return EclipseResourceUtil.getProject(this);
} else if(adapter == IFile.class) {
XModelObject f = getResourceAncestor();
Object o = (f == null) ? null : f.getAdapter(IResource.class);
15 years, 11 months
JBoss Tools SVN: r19926 - workspace/examples.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2010-01-26 05:13:59 -0500 (Tue, 26 Jan 2010)
New Revision: 19926
Modified:
workspace/examples/project-examples-jbds30.xml
Log:
add a new ESB category name "ESB for SOA-P 5.0"
Modified: workspace/examples/project-examples-jbds30.xml
===================================================================
--- workspace/examples/project-examples-jbds30.xml 2010-01-26 10:13:38 UTC (rev 19925)
+++ workspace/examples/project-examples-jbds30.xml 2010-01-26 10:13:59 UTC (rev 19926)
@@ -1,4 +1,242 @@
<projects>
+<project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>helloworld</name>
+ <shortDescription>JBoss ESB HelloWorld Example - ESB</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is a runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This example is to prove that the ESB is is properly configured and happy.
+As well as to demonstrate the needed minimal files to make a basic ESB component execute.</description>
+ <size>59000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>helloworld_testclient</name>
+ <shortDescription>JBoss ESB HelloWorld Example - Client</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This example is to demonstrate how to invoke the deployed HelloWorld ESB. It requires the helloworld project.</description>
+ <size>1000000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>helloworld_action</name>
+ <shortDescription>JBoss ESB HelloWorld Action Example - ESB</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample is to demonstrate the use of multiple action invocations from a single configuration. You can use
+ a single Action class and make multiple method calls or use multiple Action
+ classes.</description>
+ <size>7100</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>helloworld_action_client</name>
+ <shortDescription>JBoss ESB HelloWorld Action Example - Client</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample is to test the deployed helloworld_action ESB. It requires the helloworld_action project</description>
+ <size>18694</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>helloworld_file_action</name>
+ <shortDescription>JBoss ESB HelloWorld File Action Example - ESB</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This is a basic example of using the File gateway feature of the JBoss ESB.
+ Files that are found in a particular directory with a particular extension
+ are sent to a JMS queue with actions for processing. Before deploy the project, please change some properties according to the readme.txt file.</description>
+ <size>7920</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>helloworld_file_action_client</name>
+ <shortDescription>JBoss ESB HelloWorld File Action Example - Client</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample is to test the deployed helloworld_file_action ESB. It requires the helloworld_file_action project.</description>
+ <size>18694</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>webservice_consumer1</name>
+ <shortDescription>JBoss ESB Web Service consumer1 Example</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This example demonstrates how to consume a 181 Web Service in an ESB action.
+ This ESB will make a webservice request that requires a single "toWhom" string parameter.
+ The webservice will return a greeting response. The ESB simply dislays the response on the
+ console.</description>
+ <size>22500</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>webservice_consumer1_client</name>
+ <shortDescription>JBoss ESB Web Service consumer1 Example - Client</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample is to test the deployed a comsumer web service.It requires the webservice_consumer1 project.</description>
+ <size>1000000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>webservice_producer</name>
+ <shortDescription>JBoss ESB Web Service producer Example</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample demonstrates how to deploy a JSR181 Webservice endpoint on
+ JBossESB using the SOAPProcessor action.</description>
+ <size>53000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>webservice_producer_client</name>
+ <shortDescription>JBoss ESB Web Service producer Example - Client</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample is to test the deployed a web service endpoint.It requires the webservice_producer project.</description>
+ <size>14200</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>transform_CSV2XML</name>
+ <shortDescription>JBoss ESB Smooks CSV->XML Example</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample demonstrates how to transform a comma separated value (CSV) file to an xml.
+ The tranformation is done by configuring Smooks and performing two transformation, one
+ transformation from CSV to an intermediate xml format, and a second transformation from
+ the intermediate xml format to the target xml.</description>
+ <size>7200</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>transform_CSV2XML_client</name>
+ <shortDescription>JBoss ESB Smooks CSV->XML Example - Client</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample is to test the JBoss ESB smooks CSV->XML transformation.It requires the transform_CSV2XML project.</description>
+ <size>16600</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>transform_XML2POJO</name>
+ <shortDescription>JBoss ESB Smooks XML->POJO Example</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ The purpose of the simple_transformation sample is to illustrate the
+use of Smooks performing a simple transformation by converting a XML file into
+Java POJOs.</description>
+ <size>26600</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>transform_XML2POJO_client</name>
+ <shortDescription>JBoss ESB Smooks XML->POJO Example - Client</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample is to test the JBoss ESB smooks XML->POJO transformation.It requires the transform_XML2POJO project.</description>
+ <size>22400</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>transform_XML2XML_date_manipulation</name>
+ <shortDescription>JBoss ESB Smooks XML->XML date-manipulation Example</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This is another simple sample of how to manually define and apply a Message
+ Transformation within JBoss ESB.
+
+ This sample is an extension of the "transformation_XML2XML_simple"
+ Quickstart, demonstrating how JBoss ESB Transformations can simplify your
+ XSLT transformations by combining the power of XSLT with Java. In this
+ Quickstart, we use Java to perform the ugly string manipulation on the
+ SampleOrder date field (see OrderDate.java) and use XSLT for what it's good at
+ i.e. Templating. Again, the transformed SampleOrder.xml message is just
+ printed to the Java console (message before and after).</description>
+ <size>13600</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>transform_XML2XML_date_manipulation_client</name>
+ <shortDescription>JBoss ESB Smooks XML->XML date-manipulation Example - Client</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample is to test the JBoss ESB XML->XML date-manipulation transformation.It requires the transform_XML2XML_date_manipulation project.</description>
+ <size>18600</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>transform_XML2XML_simple</name>
+ <shortDescription>JBoss ESB Smooks XML->XML Example</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This is a very basic sample of how to manually define and apply a Message
+ Transformation within JBoss ESB. It applies a very simple XSLT to a
+ SampleOrder.xml message and prints the before and after XML to the console.</description>
+ <size>6700</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
+
+ <project>
+ <category>ESB for SOA-P 5.0</category>
+ <name>transform_XML2XML_simple_client</name>
+ <shortDescription>JBoss ESB Smooks XML->XML Example - Client</shortDescription>
+ <description>NOTE: Before import this example, please make sure that there is runtime named "jboss-soa-p.5.0 Runtime" in the workspace.
+ This sample is to test the JBoss ESB XML->XML transformation.It requires the transform_XML2XML_simple project.</description>
+ <size>17800</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/Denny/esb-example-soa...
+ </url>
+ </project>
</projects>
15 years, 11 months
JBoss Tools SVN: r19925 - workspace/Denny/esb-example-soa-p5.0.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2010-01-26 05:13:38 -0500 (Tue, 26 Jan 2010)
New Revision: 19925
Added:
workspace/Denny/esb-example-soa-p5.0/helloworld.zip
workspace/Denny/esb-example-soa-p5.0/helloworld_action.zip
workspace/Denny/esb-example-soa-p5.0/helloworld_action_client.zip
workspace/Denny/esb-example-soa-p5.0/helloworld_file_action.zip
workspace/Denny/esb-example-soa-p5.0/helloworld_file_action_client.zip
workspace/Denny/esb-example-soa-p5.0/helloworld_testclient.zip
workspace/Denny/esb-example-soa-p5.0/transform_CSV2XML.zip
workspace/Denny/esb-example-soa-p5.0/transform_CSV2XML_client.zip
workspace/Denny/esb-example-soa-p5.0/transform_XML2POJO.zip
workspace/Denny/esb-example-soa-p5.0/transform_XML2POJO_client.zip
workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_date_manipulation.zip
workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_date_manipulation_client.zip
workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_simple.zip
workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_simple_client.zip
workspace/Denny/esb-example-soa-p5.0/webservice_consumer1.zip
workspace/Denny/esb-example-soa-p5.0/webservice_consumer1_client.zip
workspace/Denny/esb-example-soa-p5.0/webservice_producer.zip
workspace/Denny/esb-example-soa-p5.0/webservice_producer_client.zip
Log:
ESB examples for soa-p5.0
Added: workspace/Denny/esb-example-soa-p5.0/helloworld.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/helloworld.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/helloworld_action.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/helloworld_action.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/helloworld_action_client.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/helloworld_action_client.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/helloworld_file_action.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/helloworld_file_action.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/helloworld_file_action_client.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/helloworld_file_action_client.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/helloworld_testclient.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/helloworld_testclient.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/transform_CSV2XML.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/transform_CSV2XML.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/transform_CSV2XML_client.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/transform_CSV2XML_client.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/transform_XML2POJO.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/transform_XML2POJO.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/transform_XML2POJO_client.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/transform_XML2POJO_client.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_date_manipulation.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_date_manipulation.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_date_manipulation_client.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_date_manipulation_client.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_simple.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_simple.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_simple_client.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/transform_XML2XML_simple_client.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/webservice_consumer1.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/webservice_consumer1.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/webservice_consumer1_client.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/webservice_consumer1_client.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/webservice_producer.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/webservice_producer.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/Denny/esb-example-soa-p5.0/webservice_producer_client.zip
===================================================================
(Binary files differ)
Property changes on: workspace/Denny/esb-example-soa-p5.0/webservice_producer_client.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 11 months
JBoss Tools SVN: r19924 - workspace/Denny.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2010-01-26 04:59:24 -0500 (Tue, 26 Jan 2010)
New Revision: 19924
Added:
workspace/Denny/esb-example-soa-p5.0/
Log:
ESB examples for soa-p5.0
15 years, 11 months
JBoss Tools SVN: r19923 - in trunk: as/plugins/org.jboss.ide.eclipse.as.wtp.ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-01-26 03:46:06 -0500 (Tue, 26 Jan 2010)
New Revision: 19923
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml
Log:
JBIDE-5734 - uniting the hotkeys
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/plugin.xml
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/plugin.xml 2010-01-26 07:52:47 UTC (rev 19922)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/plugin.xml 2010-01-26 08:46:06 UTC (rev 19923)
@@ -242,7 +242,7 @@
<key
commandId="org.jboss.ide.eclipse.archives.ui.buildArchiveCommand"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+M2+B A">
+ sequence="M3+M2+Y B">
</key>
</extension>
</plugin>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml 2010-01-26 07:52:47 UTC (rev 19922)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml 2010-01-26 08:46:06 UTC (rev 19923)
@@ -110,7 +110,7 @@
commandId="org.jboss.ide.eclipse.as.wtp.ui.fullPublishCommand"
contextId="org.eclipse.ui.contexts.window"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+M2+M">
+ sequence="M3+M2+Y F">
</key>
</extension>
</plugin>
15 years, 11 months
JBoss Tools SVN: r19922 - in trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui: src/org/jboss/ide/eclipse/as/wtp/ui/commands and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-01-26 02:52:47 -0500 (Tue, 26 Jan 2010)
New Revision: 19922
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/FullPublishToServerWizard.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/export/
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/commands/FullPublishCommandHandler.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportDataModelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportWizard.java
Log:
JBIDE-5690 - added ui for full publish hotkey, renamed package to xpl
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml 2010-01-25 22:51:05 UTC (rev 19921)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml 2010-01-26 07:52:47 UTC (rev 19922)
@@ -76,7 +76,7 @@
point="org.eclipse.ui.exportWizards">
<wizard
category="org.eclipse.jst.j2ee.internal"
- class="org.jboss.ide.eclipse.as.wtp.ui.wizards.export.ProjectModuleExportWizard"
+ class="org.jboss.ide.eclipse.as.wtp.ui.wizards.xpl.export.ProjectModuleExportWizard"
icon="$nl$/icons/jar_obj.gif"
id="org.jboss.ide.eclipse.as.wtp.ui.wizards.export.ProjectModuleExportWizard"
name="Module Archive">
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/commands/FullPublishCommandHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/commands/FullPublishCommandHandler.java 2010-01-25 22:51:05 UTC (rev 19921)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/commands/FullPublishCommandHandler.java 2010-01-26 07:52:47 UTC (rev 19922)
@@ -17,15 +17,28 @@
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.IHandlerListener;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IModuleArtifact;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.internal.PublishServerJob;
import org.eclipse.wst.server.core.internal.Server;
import org.eclipse.wst.server.core.internal.ServerPlugin;
+import org.eclipse.wst.server.core.util.NullModuleArtifact;
import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
+import org.jboss.ide.eclipse.as.wtp.ui.wizards.xpl.export.FullPublishToServerWizard;
public class FullPublishCommandHandler implements IHandler {
@@ -40,20 +53,24 @@
}
public Object execute(ExecutionEvent event) throws ExecutionException {
- // go around in a circle to avoid plugin dependence on debug.ui
- IResource resource = SelectedResourceManager.getDefault().getSelectedResource();
- IModule module = getModule(resource);
- Server server = (Server)getServer(module);
- if( module != null && server != null ) {
- IModule[] module2 = new IModule[]{module};
- server.setModulePublishState(module2, IServer.PUBLISH_STATE_FULL);
- ArrayList<IModule[]> allChildren = ServerModelUtilities.getDeepChildren(server, module2);
- for( int j = 0; j < allChildren.size(); j++ ) {
- server.setModulePublishState((IModule[])allChildren.get(j), IServer.PUBLISH_STATE_FULL);
+ try {
+ // go around in a circle to avoid plugin dependence on debug.ui
+ IResource resource = SelectedResourceManager.getDefault().getSelectedResource();
+ IModule module = getModule(resource);
+ IServer server = getServer(module, new NullModuleArtifact(module), new NullProgressMonitor());
+ if( module != null && server != null ) {
+ IModule[] module2 = new IModule[]{module};
+ ((Server)server).setModulePublishState(module2, IServer.PUBLISH_STATE_FULL);
+ ArrayList<IModule[]> allChildren = ServerModelUtilities.getDeepChildren(server, module2);
+ for( int j = 0; j < allChildren.size(); j++ ) {
+ ((Server)server).setModulePublishState((IModule[])allChildren.get(j), IServer.PUBLISH_STATE_FULL);
+ }
+ new PublishServerJob(server, IServer.PUBLISH_INCREMENTAL, true).schedule();
}
+ return null;
+ } catch( CoreException ce) {
+ throw new ExecutionException(ce.getMessage(), ce.getStatus().getException());
}
- new PublishServerJob(server, IServer.PUBLISH_INCREMENTAL, true).schedule();
- return null;
}
public IServer getServer(IModule module) {
@@ -82,19 +99,81 @@
protected IModule getModule(IResource resource) {
IModule module = null;
+ ArrayList<IModule> possibleModules = new ArrayList<IModule>();
if (resource != null) {
IModuleArtifact[] moduleArtifacts = ServerPlugin.getModuleArtifacts(resource);
- IModuleArtifact moduleArtifact = null;
if (moduleArtifacts != null && moduleArtifacts.length > 0)
- moduleArtifact = moduleArtifacts[0];
+ for( int i = 0; i < moduleArtifacts.length; i++ )
+ if( moduleArtifacts[i].getModule() != null &&
+ !possibleModules.contains(moduleArtifacts[i].getModule()))
+ possibleModules.add(moduleArtifacts[i].getModule());
+ if( possibleModules.size() > 0 ) {
+ module = promptForModule(possibleModules);
+ }
+ }
+ return module;
+ }
+
+ protected IModule promptForModule(ArrayList<IModule> modules) {
+ if(modules.size() == 1 )
+ return modules.get(0);
+ // TODO prompt
+ return modules.get(0);
+ }
+
+ public IServer getServer(IModule module, IModuleArtifact moduleArtifact, IProgressMonitor monitor) throws CoreException {
+ IServer server = ServerCore.getDefaultServer(module);
+ if (server != null && !ServerUtil.containsModule(server, module, monitor)) {
+ IServerWorkingCopy wc = server.createWorkingCopy();
+ try {
+ ServerUtil.modifyModules(wc, new IModule[] { module }, new IModule[0], monitor);
+ wc.save(false, monitor);
+ } catch (CoreException ce) {
+ server = null;
+ }
+ }
+
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ if (server == null) {
+ // try the full wizard
+ FullPublishToServerWizard wizard = new FullPublishToServerWizard(module, moduleArtifact);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ if (dialog.open() == Window.CANCEL) {
+ if (monitor != null)
+ monitor.setCanceled(true);
+ return null;
+ }
- if (moduleArtifact != null)
- module = moduleArtifact.getModule();
+ try {
+ Job.getJobManager().join("org.eclipse.wst.server.ui.family", null);
+ } catch (Exception e) {
+ }
+ server = wizard.getServer();
+ boolean preferred = wizard.isPreferredServer();
+// tasksAndClientShown = true;
+// client = wizard.getSelectedClient();
+// launchableAdapter = wizard.getLaunchableAdapter();
+ // set preferred server if requested
+ if (server != null && preferred) {
+ try {
+ ServerCore.setDefaultServer(module, server, monitor);
+ } catch (CoreException ce) {
+ String message = "Could not save server preference information.";
+ ErrorDialog.openError(shell, "Server Error", message, ce.getStatus());
+ }
+ }
}
- return module;
+
+ try {
+ Job.getJobManager().join("org.eclipse.wst.server.ui.family", new NullProgressMonitor());
+ } catch (Exception e) {
+ }
+
+ return server;
}
+
public boolean isEnabled() {
IResource resource = SelectedResourceManager.getDefault().getSelectedResource();
IModule module = getModule(resource);
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export (from rev 18927, trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/export)
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/FullPublishToServerWizard.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/FullPublishToServerWizard.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/FullPublishToServerWizard.java 2010-01-26 07:52:47 UTC (rev 19922)
@@ -0,0 +1,59 @@
+package org.jboss.ide.eclipse.as.wtp.ui.wizards.xpl.export;
+
+import java.util.List;
+
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.TaskModel;
+import org.eclipse.wst.server.ui.internal.wizard.TaskWizard;
+import org.eclipse.wst.server.ui.internal.wizard.WizardTaskUtil;
+import org.eclipse.wst.server.ui.internal.wizard.fragment.ModifyModulesWizardFragment;
+import org.eclipse.wst.server.ui.internal.wizard.fragment.NewServerWizardFragment;
+import org.eclipse.wst.server.ui.internal.wizard.fragment.RunOnServerWizardFragment;
+import org.eclipse.wst.server.ui.internal.wizard.fragment.TasksWizardFragment;
+import org.eclipse.wst.server.ui.wizard.WizardFragment;
+
+public class FullPublishToServerWizard extends TaskWizard {
+
+ public FullPublishToServerWizard(IModule module, IModuleArtifact moduleArtifact) {
+ super("Full Publish To Server", createRootFragment(module, moduleArtifact));
+ getTaskModel().putObject(TaskModel.TASK_LAUNCH_MODE, "run");
+ setNeedsProgressMonitor(true);
+ }
+
+ public static WizardFragment createRootFragment(IModule module,IModuleArtifact artifact) {
+ return new RunOnServerWizardFragment(module, null, artifact) {
+ protected void createChildFragments(List<WizardFragment> list) {
+ if (server == null) {
+ list.add(new NewServerWizardFragment(module));
+ list.add(WizardTaskUtil.TempSaveRuntimeFragment);
+ list.add(WizardTaskUtil.TempSaveServerFragment);
+ list.add(new ModifyModulesWizardFragment(module));
+ }
+ list.add(new TasksWizardFragment());
+ list.add(WizardTaskUtil.SaveRuntimeFragment);
+ list.add(WizardTaskUtil.SaveServerFragment);
+ if (server == null)
+ list.add(WizardTaskUtil.SaveHostnameFragment);
+ }
+ };
+ }
+
+ public IServer getServer() {
+ return (IServer) getTaskModel().getObject(TaskModel.TASK_SERVER);
+ }
+
+ public boolean isPreferredServer() {
+ try {
+ Boolean b = (Boolean) getTaskModel().getObject(WizardTaskUtil.TASK_DEFAULT_SERVER);
+ return b.booleanValue();
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ public boolean shouldAppear() {
+ return getServer() == null;
+ }
+}
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportDataModelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/export/ProjectModuleExportDataModelProvider.java 2009-11-30 17:40:03 UTC (rev 18927)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportDataModelProvider.java 2010-01-26 07:52:47 UTC (rev 19922)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.ide.eclipse.as.wtp.ui.wizards.export;
+package org.jboss.ide.eclipse.as.wtp.ui.wizards.xpl.export;
import java.util.ArrayList;
import java.util.HashMap;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/export/ProjectModuleExportPage.java 2009-11-30 17:40:03 UTC (rev 18927)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportPage.java 2010-01-26 07:52:47 UTC (rev 19922)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.ide.eclipse.as.wtp.ui.wizards.export;
+package org.jboss.ide.eclipse.as.wtp.ui.wizards.xpl.export;
import java.util.Iterator;
import java.util.Set;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportWizard.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/export/ProjectModuleExportWizard.java 2009-11-30 17:40:03 UTC (rev 18927)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/wizards/xpl/export/ProjectModuleExportWizard.java 2010-01-26 07:52:47 UTC (rev 19922)
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.ide.eclipse.as.wtp.ui.wizards.export;
+package org.jboss.ide.eclipse.as.wtp.ui.wizards.xpl.export;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IExportWizard;
15 years, 11 months
JBoss Tools SVN: r19921 - trunk/examples/plugins/org.jboss.tools.project.examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-01-25 17:51:05 -0500 (Mon, 25 Jan 2010)
New Revision: 19921
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-1070 Clean up project examples locations
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2010-01-25 22:35:19 UTC (rev 19920)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2010-01-25 22:51:05 UTC (rev 19921)
@@ -87,14 +87,5 @@
point="org.eclipse.core.runtime.preferences">
<initializer class="org.jboss.tools.project.examples.preferences.ProjectExamplesPreferencesInitializer"/>
</extension>
- <extension
- name="%JBoss_Tools_Community_Examples_3.1M4"
- point="org.jboss.tools.project.examples.projectExamplesXml">
- <url>
- http://anonsvn.jboss.org/repos/jbosstools/workspace/examples/project-exam...
- </url>
- <experimental>
- false
- </experimental>
- </extension>
+
</plugin>
15 years, 11 months