JBoss Tools SVN: r41790 - in branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core: jdt and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-06-07 17:13:09 -0400 (Thu, 07 Jun 2012)
New Revision: 41790
Modified:
branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java
branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JdtUtils.java
Log:
Fixed - JBIDE-12128
NPE when moving JAX-RS resource into another package
Modified: branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java
===================================================================
--- branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java 2012-06-07 21:12:26 UTC (rev 41789)
+++ branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java 2012-06-07 21:13:09 UTC (rev 41790)
@@ -694,12 +694,14 @@
int flags = existingMethod.mergeAnnotations(matchingMethod.getAnnotations());
final CompilationUnit matchingResourceAST = CompilationUnitsRepository.getInstance().getAST(matchingResource.getResource());
final JavaMethodSignature matchingResourceMethodSignature = JdtUtils.resolveMethodSignature(matchingMethod.getJavaElement(), matchingResourceAST);
- flags += existingMethod.update(matchingResourceMethodSignature);
- if ((flags & F_ELEMENT_KIND) > 0 && existingMethod.getKind() == EnumKind.UNDEFINED) {
- metamodel.remove(existingMethod);
- changes.add(new JaxrsElementDelta(existingMethod, REMOVED));
- } else if (flags > 0) {
- changes.add(new JaxrsElementDelta(existingMethod, CHANGED, flags));
+ if(matchingResourceMethodSignature != null) {
+ flags += existingMethod.update(matchingResourceMethodSignature);
+ if ((flags & F_ELEMENT_KIND) > 0 && existingMethod.getKind() == EnumKind.UNDEFINED) {
+ metamodel.remove(existingMethod);
+ changes.add(new JaxrsElementDelta(existingMethod, REMOVED));
+ } else if (flags > 0) {
+ changes.add(new JaxrsElementDelta(existingMethod, CHANGED, flags));
+ }
}
}
for (Entry<String, JaxrsResourceMethod> entry : removedMethods.entrySet()) {
Modified: branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JdtUtils.java
===================================================================
--- branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JdtUtils.java 2012-06-07 21:12:26 UTC (rev 41789)
+++ branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/jdt/JdtUtils.java 2012-06-07 21:13:09 UTC (rev 41790)
@@ -582,7 +582,16 @@
return methodsVisitor.getMethodSignatures();
}
+ /**
+ * Returns the method signature for the given method with the given AST.
+ * @param method the java method
+ * @param ast the associated Compilation Unit AST
+ * @return the JavaMethodSignature or null if the given AST is null.
+ */
public static JavaMethodSignature resolveMethodSignature(IMethod method, CompilationUnit ast) {
+ if(ast == null) {
+ return null;
+ }
JavaMethodSignaturesVisitor methodsVisitor = new JavaMethodSignaturesVisitor(method);
ast.accept(methodsVisitor);
return methodsVisitor.getMethodSignature();
13 years, 4 months
JBoss Tools SVN: r41789 - branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.ui.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-06-07 17:12:26 -0400 (Thu, 07 Jun 2012)
New Revision: 41789
Modified:
branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.ui/plugin.xml
Log:
Fixed - JBIDE-12105
Weird behaviour after selecting content proposal in PathParam annotation
Modified: branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.ui/plugin.xml
===================================================================
--- branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.ui/plugin.xml 2012-06-07 20:46:22 UTC (rev 41788)
+++ branches/jbosstools-3.3.x/ws/plugins/org.jboss.tools.ws.jaxrs.ui/plugin.xml 2012-06-07 21:12:26 UTC (rev 41789)
@@ -286,9 +286,9 @@
activate="true"
categoryId="org.eclipse.jdt.ui.defaultProposalCategory"
class="org.jboss.tools.ws.jaxrs.ui.contentassist.PathParamAnnotationValueCompletionProposalComputer">
- <partition
+ <!--partition
type="__dftl_partition_content_type">
- </partition>
+ </partition-->
<partition
type="__java_string">
</partition>
13 years, 4 months
JBoss Tools SVN: r41787 - in trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui: internal/wizard and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-06-07 16:40:45 -0400 (Thu, 07 Jun 2012)
New Revision: 41787
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/xpl/NewJavaClassWizardPageEx.java
Log:
JBIDE-12125 - Cannot invoke New Portlet wizard if no Dynamic Web Project is present
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java 2012-06-07 18:03:05 UTC (rev 41786)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java 2012-06-07 20:40:45 UTC (rev 41787)
@@ -16,6 +16,7 @@
import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@@ -82,12 +83,20 @@
}
public static IFile getPortletXmlFile(IProject project) {
+ try {
+ if (project == null || !project.hasNature(IModuleConstants.MODULE_NATURE_ID)) {
+ return null;
+ }
+ } catch (CoreException e) {
+ log(e);
+ return null;
+ }
IVirtualComponent component = ComponentCore.createComponent(project);
IVirtualFile portletVirtualFile = component.getRootFolder().getFile(
IPortletConstants.CONFIG_PATH);
if (!portletVirtualFile.getUnderlyingFile().exists()) {
- log(new RuntimeException(Messages.PortletUIActivator_The_portlet_xml_file_doesnt_exist));
+ //log(new RuntimeException(Messages.PortletUIActivator_The_portlet_xml_file_doesnt_exist));
return null;
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2012-06-07 18:03:05 UTC (rev 41786)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2012-06-07 20:40:45 UTC (rev 41787)
@@ -25,6 +25,7 @@
import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.window.Window;
+import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
import org.eclipse.jst.j2ee.internal.war.ui.util.WebServletGroupItemProvider;
import org.eclipse.jst.j2ee.internal.wizard.AnnotationsStandaloneGroup;
import org.eclipse.jst.j2ee.internal.wizard.NewJavaClassWizardPage;
@@ -42,9 +43,11 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
+import org.eclipse.wst.common.project.facet.core.internal.FacetedProject;
import org.jboss.tools.portlet.core.IPortletConstants;
import org.jboss.tools.portlet.ui.Messages;
import org.jboss.tools.portlet.ui.MultiSelectFilteredFileSelectionDialog;
@@ -83,8 +86,7 @@
protected boolean isProjectValid(IProject project) {
boolean result;
try {
- result = project.isAccessible() &&
- project.hasNature(JavaCore.NATURE_ID);
+ return FacetedProjectFramework.hasProjectFacet(project, IPortletConstants.PORTLET_FACET_ID);
} catch (CoreException ce) {
result = false;
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/xpl/NewJavaClassWizardPageEx.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/xpl/NewJavaClassWizardPageEx.java 2012-06-07 18:03:05 UTC (rev 41786)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/xpl/NewJavaClassWizardPageEx.java 2012-06-07 20:40:45 UTC (rev 41787)
@@ -80,6 +80,8 @@
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
+import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
+import org.jboss.tools.portlet.core.IPortletConstants;
import org.jboss.tools.portlet.ui.PortletUIActivator;
/**
@@ -239,9 +241,7 @@
protected boolean isProjectValid(IProject project) {
boolean result;
try {
- result = project.isAccessible() &&
- project.hasNature(IModuleConstants.MODULE_NATURE_ID) &&
- J2EEProjectUtilities.getJ2EEProjectType(project).equals(projectType);
+ return FacetedProjectFramework.hasProjectFacet(project, IPortletConstants.JSFPORTLET_FACET_ID);
} catch (CoreException ce) {
result = false;
}
13 years, 4 months
JBoss Tools SVN: r41786 - in trunk/esb/plugins/org.jboss.tools.esb.core: resources/meta and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-06-07 14:03:05 -0400 (Thu, 07 Jun 2012)
New Revision: 41786
Added:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/MessageFlowPriorityConverter.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-attrs.properties
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb13.meta
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb131.meta
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBCustomizedObjectImpl.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBLoaderUtil.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificActionLoader.java
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificPropertyConverter.java
Log:
JBIDE-11868
https://issues.jboss.org/browse/JBIDE-11868
Field editor 'Message Flow Priority' added to forms for service/bus/provider/listener elements.
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-attrs.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-attrs.properties 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/help/keys-esb-attrs.properties 2012-06-07 18:03:05 UTC (rev 41786)
@@ -98,6 +98,7 @@
ESB.jndi_context_factory=Jndi Context Factory
ESB.jndi_pkg_prefix=Jndi Pkg Prefix
ESB.jndi_url=Jndi URL
+ESB.message_flow_priority=Message Flow Priority
ESB.channel_id_ref=Channel ID Ref
ESB.max_threads=Max Threads
ESB.is_gateway=Is Gateway
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2012-06-07 18:03:05 UTC (rev 41786)
@@ -293,6 +293,23 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="id" xmlname="busid"/>
+ <XModelAttribute PROPERTIES="category=advanced;pre=true"
+ name="message flow priority" xmlname="messageFlowPriority">
+ <Constraint loader="List">
+ <value/>
+ <value name="0"/>
+ <value name="1"/>
+ <value name="2"/>
+ <value name="3"/>
+ <value name="4"/>
+ <value name="5"/>
+ <value name="6"/>
+ <value name="7"/>
+ <value name="8"/>
+ <value name="9"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -352,6 +369,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="name" xmlname="name"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -430,6 +449,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="id" xmlname="busid"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -470,6 +491,8 @@
<XModelAttributeReference
attributes="poll frequency seconds,schedule frequency,schedule id ref"
entity="ESBScheduledListener101" name="scheduled listener"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -597,6 +620,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="name" xmlname="name"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -639,6 +664,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="id" xmlname="busid"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -794,6 +821,8 @@
name="name" xmlname="name"/>
<XModelAttribute PROPERTIES="category=general;save=always"
name="hostname" xmlname="hostname"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -838,6 +867,8 @@
entity="ESBListener101" name="listener"/>
<XModelAttribute PROPERTIES="category=general;save=always"
name="script" xmlname="script"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -994,6 +1025,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="id" xmlname="busid"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -1039,6 +1072,8 @@
<XModelAttributeReference
attributes="name,channel id ref,max threads,is gateway"
entity="ESBListener101" name="listener"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -1124,6 +1159,8 @@
name="name" xmlname="name"/>
<XModelAttribute PROPERTIES="category=general;save=always"
name="hibernate cfg file" xmlname="hibernate-cfg-file"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -1378,6 +1415,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced"
name="provider adapter JNDI" xmlname="providerAdapterJNDI"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -1414,6 +1453,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="id" xmlname="busid"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -1577,6 +1618,8 @@
<XModelAttribute PROPERTIES="category=advanced"
name="jndi pkg prefix" xmlname="jndi-pkg-prefix"/>
<XModelAttribute PROPERTIES="category=advanced" name="jndi url" xmlname="jndi-URL"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -2169,6 +2212,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="id" xmlname="busid"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -2299,6 +2344,8 @@
<XModelAttribute PROPERTIES="category=advanced" name="password" xmlname="password"/>
<XModelAttributeReference attributes="transacted"
entity="ESBScheduledListener101" name="transacted"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -2371,6 +2418,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="name" xmlname="name"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -2452,6 +2501,8 @@
</Constraint>
<Editor name="ListString"/>
</XModelAttribute>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -2784,6 +2835,8 @@
<XModelAttribute PROPERTIES="category=advanced" name="handler class" xmlname="handlerClass">
<Constraint loader="%IntEL%"/>
</XModelAttribute>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb12.meta 2012-06-07 18:03:05 UTC (rev 41786)
@@ -349,6 +349,8 @@
<XModelAttributeReference
attributes="poll frequency seconds,schedule frequency,schedule id ref"
entity="ESBScheduledListener101" name="scheduled listener"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -487,6 +489,8 @@
</Constraint>
<Editor name="ListString"/>
</XModelAttribute>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -533,6 +537,8 @@
</Constraint>
<Editor name="ListString"/>
</XModelAttribute>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -570,6 +576,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="name" xmlname="name"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -616,6 +624,8 @@
name="port" xmlname="port">
<Constraint loader="%IntEL%"/>
</XModelAttribute>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -695,6 +705,8 @@
<XModelAttributeReference
attributes="name,channel id ref,max threads,is gateway"
entity="ESBListener101" name="listener"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -743,6 +755,8 @@
<Editor name="List"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="host" xmlname="host"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -803,6 +817,8 @@
</Constraint>
<Editor name="ListString"/>
</XModelAttribute>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -838,6 +854,8 @@
<XModelAttributeReference
attributes="name,channel id ref,max threads,is gateway"
entity="ESBListener101" name="listener"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -1130,6 +1148,8 @@
entity="ESBListener101" name="listener"/>
<XModelAttributeReference attributes="poll frequency seconds"
entity="ESBScheduledListener101" name="scheduled listener"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb13.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb13.meta 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb13.meta 2012-06-07 18:03:05 UTC (rev 41786)
@@ -105,6 +105,8 @@
<Editor name="ListString"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced" name="timeout" xmlname="timeout"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -158,6 +160,8 @@
<Editor name="ListString"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced" name="timeout" xmlname="timeout"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -201,6 +205,8 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="name" xmlname="name"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
@@ -289,11 +295,13 @@
attributes="name,channel id ref,max threads,is gateway"
entity="ESBListener101" name="listener"/>
<XModelAttribute PROPERTIES="category=advanced" name="client id" xmlname="clientId"/>
+ <XModelAttribute PROPERTIES="category=advanced"
+ name="durable subscription name" xmlname="durableSubscriptionName"/>
+ <XModelAttributeReference attributes="message flow priority"
+ entity="ESBBus" name="message flow priority"/>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
- <XModelAttribute PROPERTIES="category=advanced"
- name="durable subscription name" xmlname="durableSubscriptionName"/>
</XModelAttributes>
<XActionItem kind="list">
<XActionItem kind="list" name="CreateActions">
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb131.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb131.meta 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb131.meta 2012-06-07 18:03:05 UTC (rev 41786)
@@ -47,6 +47,23 @@
</Constraint>
<Editor name="ListString"/>
</XModelAttribute>
+ <XModelAttribute PROPERTIES="category=advanced;pre=true"
+ name="message flow priority" xmlname="messageFlowPriority">
+ <Constraint loader="List">
+ <value name=""/>
+ <value name="0"/>
+ <value name="1"/>
+ <value name="2"/>
+ <value name="3"/>
+ <value name="4"/>
+ <value name="5"/>
+ <value name="6"/>
+ <value name="7"/>
+ <value name="8"/>
+ <value name="9"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBConstants.java 2012-06-07 18:03:05 UTC (rev 41786)
@@ -195,5 +195,7 @@
public String ATTR_SCHEDULE_ID = "schedule id"; //$NON-NLS-1$
public String ATTR_SCHEDULE_ID_REF = "schedule id ref"; //$NON-NLS-1$
+ public String ATTR_MESSAGE_FLOW_PRIORITY = "message flow priority"; //$NON-NLS-1$
+
public String XML_ATTR_PROTECTED_METHODS = "protected-methods"; //$NON-NLS-1$
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBCustomizedObjectImpl.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBCustomizedObjectImpl.java 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBCustomizedObjectImpl.java 2012-06-07 18:03:05 UTC (rev 41786)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.esb.core.model;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.impl.CustomizedObjectImpl;
import org.jboss.tools.common.model.impl.OrderedByEntityChildren;
import org.jboss.tools.common.model.impl.RegularChildren;
@@ -33,4 +35,33 @@
return super.createChildren();
}
+ public boolean isAttributeEditable(String name) {
+ if(ESBConstants.ATTR_MESSAGE_FLOW_PRIORITY.equals(name)) {
+ String entity = getModelEntity().getName();
+ if(entity.startsWith(ESBConstants.ENT_ESB_SERVICE)) {
+ XModelObject as = getChildByPath("Actions");
+ if(as != null) {
+ String inxsd = as.getAttributeValue("in xsd");
+ if(inxsd == null || inxsd.length() == 0 || "false".equals(as.getAttributeValue("webservice"))) {
+ return false;
+ }
+ }
+ }
+ if(getModelEntity().getAttribute("is gateway") != null && !"true".equals(getAttributeValue("is gateway"))) {
+ return false;
+ }
+ XModelObject p = FileSystemsHelper.getFile(this);
+ if(p != null) {
+ String fileEntity = p.getModelEntity().getName();
+ if(ESBConstants.ENT_ESB_FILE_101.equals(fileEntity)
+ || ESBConstants.ENT_ESB_FILE_110.equals(fileEntity)
+ || ESBConstants.ENT_ESB_FILE_120.equals(fileEntity)
+ || ESBConstants.ENT_ESB_FILE_130.equals(fileEntity)) {
+ return false;
+ }
+ }
+ }
+ return super.isAttributeEditable(name);
+ }
+
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBLoaderUtil.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBLoaderUtil.java 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBLoaderUtil.java 2012-06-07 18:03:05 UTC (rev 41786)
@@ -18,6 +18,7 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
import org.jboss.tools.common.xml.XMLUtilities;
+import org.jboss.tools.esb.core.model.converters.MessageFlowPriorityConverter;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -56,7 +57,8 @@
String entity = o.getModelEntity().getName();
if(SpecificActionLoader.instance.isActionsFolder(entity)) {
SpecificActionLoader.instance.convertChildrenToSpecific(o);
- } else if("true".equals(o.getModelEntity().getProperty("hasConvertedProperties"))) {
+ } else if("true".equals(o.getModelEntity().getProperty("hasConvertedProperties"))
+ || o.getModelEntity().getAttribute(ESBConstants.ATTR_MESSAGE_FLOW_PRIORITY) != null) {
SpecificPropertyConverter.instance.convertBasicToSpecific(o);
}
}
@@ -65,7 +67,8 @@
if(!needToSave(o)) return true;
if(SpecificActionLoader.instance.isPreActionEntity(o)) {
o = SpecificActionLoader.instance.convertSpecificActionToBasic(o);
- } else if("true".equals(o.getModelEntity().getProperty("hasConvertedProperties"))) {
+ } else if("true".equals(o.getModelEntity().getProperty("hasConvertedProperties"))
+ || o.getModelEntity().getAttribute(ESBConstants.ATTR_MESSAGE_FLOW_PRIORITY) != null) {
o = SpecificPropertyConverter.instance.convertSpecificToBasic(o);
}
return super.save(parent, o);
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificActionLoader.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificActionLoader.java 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificActionLoader.java 2012-06-07 18:03:05 UTC (rev 41786)
@@ -198,19 +198,23 @@
String pre = as[i].getProperty("pre");
if(pre == null || pre.length() == 0) continue;
if("true".equals(pre)) {
- String name = as[i].getXMLName();
- XModelObject p = basic.getChildByPath(name);
- if(p == null) continue;
- String value = p.getAttributeValue("value");
- specific.setAttributeValue(as[i].getName(), value);
- specific.set(as[i].getXMLName() + ".#comment", p.getAttributeValue("comment"));
- p.removeFromParent();
+ copyBasicPropertyToSpecificAttribute(basic, specific, as[i]);
} else {
//very specific cases
}
}
}
+ public static void copyBasicPropertyToSpecificAttribute(XModelObject basic, XModelObject specific, XAttribute a) {
+ String name = a.getXMLName();
+ XModelObject p = basic.getChildByPath(name);
+ if(p == null) return;
+ String value = p.getAttributeValue("value");
+ specific.setAttributeValue(a.getName(), value);
+ specific.set(a.getXMLName() + ".#comment", p.getAttributeValue("comment"));
+ p.removeFromParent();
+ }
+
public static void copySpecificAtttributesToBasicProperties(XModelObject specific, XModelObject basic) {
XModelEntity entity = specific.getModelEntity();
XAttribute[] as = entity.getAttributes();
@@ -218,18 +222,22 @@
String pre = as[i].getProperty("pre");
if(pre == null || pre.length() == 0) continue;
if("true".equals(pre)) {
- String value = specific.getAttributeValue(as[i].getName());
- if(value == null || value.length() == 0 || value.equals(as[i].getDefaultValue())) {
- if(!"always".equals(as[i].getProperty("save"))) continue;
- }
- XModelObject p = specific.getModel().createModelObject(ESBConstants.ENT_ESB_PROPERTY, null);
- p.setAttributeValue("name", as[i].getXMLName());
- p.setAttributeValue("value", value);
- p.setAttributeValue("comment", specific.get(as[i].getXMLName() + ".#comment"));
- basic.addChild(p);
+ copySpecificAttributeToBasicProperty(specific, basic, as[i]);
} else {
//very specific cases
}
}
}
+
+ public static void copySpecificAttributeToBasicProperty(XModelObject specific, XModelObject basic, XAttribute a) {
+ String value = specific.getAttributeValue(a.getName());
+ if(value == null || value.length() == 0 || value.equals(a.getDefaultValue())) {
+ if(!"always".equals(a.getProperty("save"))) return;
+ }
+ XModelObject p = specific.getModel().createModelObject(ESBConstants.ENT_ESB_PROPERTY, null);
+ p.setAttributeValue("name", a.getXMLName());
+ p.setAttributeValue("value", value);
+ p.setAttributeValue("comment", specific.get(a.getXMLName() + ".#comment"));
+ basic.addChild(p);
+ }
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificPropertyConverter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificPropertyConverter.java 2012-06-07 17:41:15 UTC (rev 41785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/SpecificPropertyConverter.java 2012-06-07 18:03:05 UTC (rev 41786)
@@ -15,6 +15,7 @@
import org.jboss.tools.esb.core.model.converters.FTPListenerConverter;
import org.jboss.tools.esb.core.model.converters.IPropertyConverter;
import org.jboss.tools.esb.core.model.converters.JBRListenerConverter;
+import org.jboss.tools.esb.core.model.converters.MessageFlowPriorityConverter;
/**
* When loading from xml, reads 'raw' list of esb property children of loaded object
@@ -47,6 +48,10 @@
} else if(JBR_ENTITIES.indexOf("." + entity + ".") >= 0) {
JBRListenerConverter.instance.toSpecific(basic, basic);
}
+
+ if(basic.getModelEntity().getAttribute(ATTR_MESSAGE_FLOW_PRIORITY) != null) {
+ MessageFlowPriorityConverter.instance.toSpecific(basic, basic);
+ }
return basic;
}
@@ -60,6 +65,15 @@
basic = basic.copy();
JBRListenerConverter.instance.toBasic(basic, specific);
}
+
+ if(basic.getModelEntity().getAttribute(ATTR_MESSAGE_FLOW_PRIORITY) != null) {
+ String value = basic.getAttributeValue(ATTR_MESSAGE_FLOW_PRIORITY);
+ if(value != null && value.length() > 0) {
+ if(basic == specific) basic = basic.copy();
+ MessageFlowPriorityConverter.instance.toBasic(basic, specific);
+ basic.setAttributeValue(ATTR_MESSAGE_FLOW_PRIORITY, "");
+ }
+ }
return basic;
}
Added: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/MessageFlowPriorityConverter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/MessageFlowPriorityConverter.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/MessageFlowPriorityConverter.java 2012-06-07 18:03:05 UTC (rev 41786)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.esb.core.model.converters;
+
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.esb.core.model.ESBConstants;
+import org.jboss.tools.esb.core.model.SpecificActionLoader;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class MessageFlowPriorityConverter implements IPropertyConverter {
+ public static MessageFlowPriorityConverter instance = new MessageFlowPriorityConverter();
+
+ public MessageFlowPriorityConverter() {}
+
+ public void toBasic(XModelObject basic, XModelObject specific) {
+ XAttribute a = specific.getModelEntity().getAttribute(ESBConstants.ATTR_MESSAGE_FLOW_PRIORITY);
+ if(a != null) SpecificActionLoader.copySpecificAttributeToBasicProperty(specific, basic, a);
+ }
+
+ public void toSpecific(XModelObject basic, XModelObject specific) {
+ XAttribute a = specific.getModelEntity().getAttribute(ESBConstants.ATTR_MESSAGE_FLOW_PRIORITY);
+ if(a != null) SpecificActionLoader.copyBasicPropertyToSpecificAttribute(basic, specific, a);
+ }
+
+}
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/converters/MessageFlowPriorityConverter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 4 months
JBoss Tools SVN: r41785 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-06-07 13:41:15 -0400 (Thu, 07 Jun 2012)
New Revision: 41785
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java
Log:
Renaming java element does not force to re-validate related resources https://issues.jboss.org/browse/JBIDE-10767
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java 2012-06-07 17:30:18 UTC (rev 41784)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java 2012-06-07 17:41:15 UTC (rev 41785)
@@ -80,7 +80,6 @@
@Override
protected void releaseDocument(IDocument document, IProgressMonitor pm)
throws CoreException {
- // TODO Auto-generated method stub
super.releaseDocument(document, pm);
try {
getFile().touch(new NullProgressMonitor());
13 years, 4 months
JBoss Tools SVN: r41784 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-06-07 13:30:18 -0400 (Thu, 07 Jun 2012)
New Revision: 41784
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java
Log:
Renaming java element does not force to re-validate related resources https://issues.jboss.org/browse/JBIDE-10767
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java 2012-06-07 16:24:34 UTC (rev 41783)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/refactoring/BaseFileChange.java 2012-06-07 17:30:18 UTC (rev 41784)
@@ -14,16 +14,16 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
+import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.MultiStateTextFileChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
+import org.eclipse.ltk.core.refactoring.ContentStamp;
import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.text.edits.TextEdit;
+import org.eclipse.ltk.core.refactoring.UndoTextFileChange;
+import org.eclipse.text.edits.MalformedTreeException;
import org.eclipse.text.edits.UndoEdit;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -35,22 +35,19 @@
import org.eclipse.ui.progress.UIJob;
import org.jboss.tools.common.CommonPlugin;
-public class BaseFileChange extends MultiStateTextFileChange{
- private IFile file;
- private BaseTextChange rootChange = null;
+public class BaseFileChange extends TextFileChange{
public BaseFileChange(IFile file) {
super(file.getName(), file);
- this.file = file;
-
setSaveMode();
}
private void setSaveMode(){
UIJob job = new UIJob("setSaveMode"){ //$NON-NLS-1$
+ @Override
public IStatus runInUIThread(IProgressMonitor monitor) {
try {
- if(isOpenInEditor(file)){
+ if(isOpenInEditor(getFile())){
setSaveMode(TextFileChange.LEAVE_DIRTY);
}else{
setSaveMode(TextFileChange.FORCE_SAVE);
@@ -79,66 +76,41 @@
}
return false;
}
-
- public IFile getFile(){
- return file;
+
+ @Override
+ protected void releaseDocument(IDocument document, IProgressMonitor pm)
+ throws CoreException {
+ // TODO Auto-generated method stub
+ super.releaseDocument(document, pm);
+ try {
+ getFile().touch(new NullProgressMonitor());
+ } catch (CoreException e) {
+ // do nothing
+ }
}
- public void setEdit(TextEdit edit) {
- rootChange = new BaseTextChange();
- rootChange.setEdit(edit);
- super.addChange(rootChange);
+ @Override
+ protected Change createUndoChange(UndoEdit edit, ContentStamp stampToRestore) {
+ return new UndoBaseFileChange(getName(), getFile(), edit, stampToRestore, getSaveMode());
}
- public TextEdit getEdit(){
- return rootChange.getEdit();
- }
-
- public void addEdit(TextEdit edit){
- rootChange.addEdit(edit);
- }
-
- class BaseTextChange extends TextChange{
+ class UndoBaseFileChange extends UndoTextFileChange{
- protected BaseTextChange() {
- super("");
+ protected UndoBaseFileChange(String name, IFile file, UndoEdit undo,
+ ContentStamp stamp, int saveMode) {
+ super(name, file, undo, stamp, saveMode);
}
@Override
- protected IDocument acquireDocument(IProgressMonitor pm)
- throws CoreException {
- return null;
+ public Change perform(IProgressMonitor pm) throws CoreException {
+ Change change = super.perform(pm);
+ try {
+ getFile().touch(new NullProgressMonitor());
+ } catch (CoreException e) {
+ // do nothing
+ }
+ return change;
}
-
- @Override
- protected void commit(IDocument document, IProgressMonitor pm)
- throws CoreException {
- }
-
- @Override
- protected void releaseDocument(IDocument document, IProgressMonitor pm)
- throws CoreException {
- }
-
- @Override
- protected Change createUndoChange(UndoEdit edit) {
- return null;
- }
-
- @Override
- public void initializeValidationData(IProgressMonitor pm) {
- }
-
- @Override
- public RefactoringStatus isValid(IProgressMonitor pm)
- throws CoreException, OperationCanceledException {
- return null;
- }
-
- @Override
- public Object getModifiedElement() {
- return null;
- }
}
}
13 years, 4 months
JBoss Tools SVN: r41783 - branches/jbosstools-3.3.x/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-06-07 12:24:34 -0400 (Thu, 07 Jun 2012)
New Revision: 41783
Modified:
branches/jbosstools-3.3.x/build/publish.sh
Log:
support Jenkins better
Modified: branches/jbosstools-3.3.x/build/publish.sh
===================================================================
--- branches/jbosstools-3.3.x/build/publish.sh 2012-06-07 16:16:34 UTC (rev 41782)
+++ branches/jbosstools-3.3.x/build/publish.sh 2012-06-07 16:24:34 UTC (rev 41783)
@@ -1,9 +1,4 @@
#!/bin/bash
-script=$0
-if [[ ${script%%publish.sh} != $script ]]; then
- script=${script/publish.sh/publish\/publish.sh}
-else
- script=`cat $0 | grep ".sh"`
- script=${script//publish.sh/publish\/publish.sh}
-fi
-${script}
+wget http://anonsvn.jboss.org/repos/jbosstools/branches/jbosstools-3.3.x/build...
+. publish.sh
+rm -fr publish.sh
13 years, 4 months
JBoss Tools SVN: r41782 - branches/jbosstools-3.3.x/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-06-07 12:16:34 -0400 (Thu, 07 Jun 2012)
New Revision: 41782
Modified:
branches/jbosstools-3.3.x/build/publish.sh
Log:
support Jenkins better
Modified: branches/jbosstools-3.3.x/build/publish.sh
===================================================================
--- branches/jbosstools-3.3.x/build/publish.sh 2012-06-07 16:09:50 UTC (rev 41781)
+++ branches/jbosstools-3.3.x/build/publish.sh 2012-06-07 16:16:34 UTC (rev 41782)
@@ -4,7 +4,6 @@
script=${script/publish.sh/publish\/publish.sh}
else
script=`cat $0 | grep ".sh"`
- script=${script/publish.sh/publish\/publish.sh}
- script=${script/. /}
+ script=${script//publish.sh/publish\/publish.sh}
fi
-. ${script}
+${script}
13 years, 4 months
JBoss Tools SVN: r41781 - branches/jbosstools-3.3.x/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-06-07 12:09:50 -0400 (Thu, 07 Jun 2012)
New Revision: 41781
Modified:
branches/jbosstools-3.3.x/build/publish.sh
Log:
support Jenkins better
Modified: branches/jbosstools-3.3.x/build/publish.sh
===================================================================
--- branches/jbosstools-3.3.x/build/publish.sh 2012-06-07 16:04:30 UTC (rev 41780)
+++ branches/jbosstools-3.3.x/build/publish.sh 2012-06-07 16:09:50 UTC (rev 41781)
@@ -3,7 +3,8 @@
if [[ ${script%%publish.sh} != $script ]]; then
script=${script/publish.sh/publish\/publish.sh}
else
- script=$1
+ script=`cat $0 | grep ".sh"`
script=${script/publish.sh/publish\/publish.sh}
+ script=${script/. /}
fi
. ${script}
13 years, 4 months