JBoss Tools SVN: r18423 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-11-05 12:32:49 -0500 (Thu, 05 Nov 2009)
New Revision: 18423
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamQueryParticipant.java
Log:
JBIDE-5093: Find usages classes/methods in EL: Search result has wrong number of matches for all files in WebContent folder
The duplicating search query is removed
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamQueryParticipant.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamQueryParticipant.java 2009-11-05 17:17:24 UTC (rev 18422)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamQueryParticipant.java 2009-11-05 17:32:49 UTC (rev 18423)
@@ -10,17 +10,10 @@
******************************************************************************/
package org.jboss.tools.seam.ui.search;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchPattern;
import org.eclipse.jdt.internal.core.search.JavaSearchScope;
-import org.eclipse.jdt.ui.search.ElementQuerySpecification;
import org.eclipse.jdt.ui.search.IMatchPresentation;
import org.eclipse.jdt.ui.search.IQueryParticipant;
import org.eclipse.jdt.ui.search.ISearchRequestor;
@@ -55,7 +48,8 @@
public void search(ISearchRequestor requestor, QuerySpecification querySpecification, IProgressMonitor monitor) throws CoreException {
//indexIfNeeded();
-
+ // >>> Fix for JBIDE-5093: If the querySpecification is an ElementQuerySpecification then we don't need to perform a search here
+ /*
// do search based on the particular Java query
if(querySpecification instanceof ElementQuerySpecification) {
// element search (eg. from global find references in Java file)
@@ -79,7 +73,9 @@
query.setParentRequestor(requestor);
query.run(monitor);
- } else if(querySpecification instanceof PatternQuerySpecification) {
+ } else */
+ // Fix for JBIDE-5093 <<<
+ if(querySpecification instanceof PatternQuerySpecification) {
// pattern search (eg. from Java search page)
PatternQuerySpecification patternQuery = (PatternQuerySpecification)querySpecification;
String pattern = patternQuery.getPattern();
15 years, 1 month
JBoss Tools SVN: r18422 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-11-05 12:17:24 -0500 (Thu, 05 Nov 2009)
New Revision: 18422
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamElementMatch.java
Log:
JBIDE-5150: NullPointerException occures while searching for the Seam Declarations made in JARs.
Issue is fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamElementMatch.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamElementMatch.java 2009-11-05 16:48:41 UTC (rev 18421)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamElementMatch.java 2009-11-05 17:17:24 UTC (rev 18422)
@@ -12,10 +12,12 @@
package org.jboss.tools.seam.ui.search;
import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.search.ui.text.Match;
import org.jboss.tools.seam.core.ISeamDeclaration;
import org.jboss.tools.seam.core.ISeamElement;
import org.jboss.tools.seam.core.ISeamJavaSourceReference;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
/**
* Seam Element match contains an information on the match found during the Seam Search Action
@@ -42,7 +44,19 @@
*/
public SeamElementMatch(ISeamJavaSourceReference element) {
super(element, 0, 0);
- fCreationTimeStamp= element.getSourceMember().getResource().getModificationStamp();
+ if (element != null && element.getSourceMember() != null && element.getSourceMember().getResource() != null) {
+ fCreationTimeStamp= element.getSourceMember().getResource().getModificationStamp();
+ } else
+ try {
+ if (element != null && element.getSourceMember().getUnderlyingResource() != null) {
+ fCreationTimeStamp = element.getSourceMember().getUnderlyingResource().getModificationStamp();
+ } else {
+ fCreationTimeStamp = 0;
+ }
+ } catch (JavaModelException e) {
+ fCreationTimeStamp = 0;
+ SeamGuiPlugin.getDefault().logError(e);
+ }
}
/**
15 years, 1 month
JBoss Tools SVN: r18421 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/proxy.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-11-05 11:48:41 -0500 (Thu, 05 Nov 2009)
New Revision: 18421
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/proxy/VpeProxyUtil.java
Log:
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/proxy/VpeProxyUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/proxy/VpeProxyUtil.java 2009-11-05 16:28:39 UTC (rev 18420)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/proxy/VpeProxyUtil.java 2009-11-05 16:48:41 UTC (rev 18421)
@@ -13,6 +13,9 @@
import java.lang.reflect.Proxy;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
@@ -20,43 +23,59 @@
import org.w3c.dom.Node;
/**
- * Utill Class created for creating proxis for vpe
- * and manipulation them
+ * Utill Class created for creating proxis for vpe and manipulation them
*
* @author mareshkau
*/
+@SuppressWarnings("restriction")
public class VpeProxyUtil {
/**
* Create proxy for source nodes. This function should be called for nodes,
* in which used el expressions which should be replaced
+ *
* @param sourceNode
* @return proxy for node
*/
- public static Node createProxyForELExpressionNode(VpePageContext pageContext,
- Node sourceNode) {
-
+ public static Node createProxyForELExpressionNode(
+ VpePageContext pageContext, Node sourceNode) {
+
Node proxy = null;
List<Class<?>> interfaceses = new ArrayList<Class<?>>();
interfaceses.add(Node.class);
- if(sourceNode instanceof Element) {
- interfaceses.add(Element.class);
- } else if(sourceNode instanceof Attr) {
+ boolean isDOMImpl = false;
+ if (sourceNode instanceof IDOMElement) {
+ interfaceses.add(IDOMElement.class);
+ isDOMImpl = true;
+ } else if (sourceNode instanceof IDOMAttr) {
+ interfaceses.add(IDOMAttr.class);
+ isDOMImpl = true;
+ }
+ if (isDOMImpl) {
+ proxy = (Node) Proxy.newProxyInstance(IDOMNode.class
+ .getClassLoader(), interfaceses.toArray(new Class[0]),
+ new VpeNodeInvocationHandler(pageContext, sourceNode));
+ } else {
+ if (sourceNode instanceof Element) {
+ interfaceses.add(Element.class);
+ } else if (sourceNode instanceof Attr) {
interfaceses.add(Attr.class);
- }
- proxy = (Node) Proxy.newProxyInstance(Node.class.getClassLoader(),
- interfaceses.toArray(new Class[0]),
- new VpeNodeInvocationHandler(pageContext,sourceNode));
-
+ }
+ proxy = (Node) Proxy.newProxyInstance(Node.class.getClassLoader(),
+ interfaceses.toArray(new Class[0]),
+ new VpeNodeInvocationHandler(pageContext, sourceNode));
+ }
return proxy;
}
-
- public static NamedNodeMap createProxyForNamedNodeMap(VpePageContext pageContext,
- NamedNodeMap namedNodeMap) {
- NamedNodeMap proxy =(NamedNodeMap)Proxy.newProxyInstance(NamedNodeMap.class.getClassLoader(),
- new Class[] {NamedNodeMap.class},
- new VpeNamedNodeMapInvocationHandler(pageContext,namedNodeMap));
+ public static NamedNodeMap createProxyForNamedNodeMap(
+ VpePageContext pageContext, NamedNodeMap namedNodeMap) {
+ NamedNodeMap proxy = (NamedNodeMap) Proxy
+ .newProxyInstance(NamedNodeMap.class.getClassLoader(),
+ new Class[] { NamedNodeMap.class },
+ new VpeNamedNodeMapInvocationHandler(pageContext,
+ namedNodeMap));
+
return proxy;
}
}
15 years, 1 month
JBoss Tools SVN: r18420 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-11-05 11:28:39 -0500 (Thu, 05 Nov 2009)
New Revision: 18420
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-928 Selection bar is optimized - VPE section is updated
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2009-11-05 16:16:01 UTC (rev 18419)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2009-11-05 16:28:39 UTC (rev 18420)
@@ -1727,8 +1727,8 @@
<para>You can find useful one more functionality provided by VPE. At the bottom of the
<property>Visual/Source view</property> there is a <property>Selection Tag
- Bar</property>. It allows to see tags tree for a current component selected in
- Visual or Source mode and allows to select tags back and forward.</para>
+ Bar</property>. It's updated automatically allowing to see tags tree for a current component selected in
+ Visual or Source mode, also it allows to select tags back and forward.</para>
<figure>
<title>Selection Tag Bar</title>
15 years, 1 month
JBoss Tools SVN: r18419 - in trunk/jsf/plugins/org.jboss.tools.jsf: src/org/jboss/tools/jsf/model/pv and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-11-05 11:16:01 -0500 (Thu, 05 Nov 2009)
New Revision: 18419
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectsRootAdapterFactory.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-5138
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2009-11-05 16:09:54 UTC (rev 18418)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2009-11-05 16:16:01 UTC (rev 18419)
@@ -474,4 +474,11 @@
</validator>
</extension>
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ class="org.jboss.tools.jsf.model.pv.JSFProjectsRootAdapterFactory"
+ adaptableType="org.jboss.tools.jsf.model.pv.JSFProjectsRoot">
+ <adapter type="org.eclipse.core.resources.IProject"/>
+ </factory>
+ </extension>
</plugin>
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectsRootAdapterFactory.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectsRootAdapterFactory.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectsRootAdapterFactory.java 2009-11-05 16:16:01 UTC (rev 18419)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.jsf.model.pv;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdapterFactory;
+
+public class JSFProjectsRootAdapterFactory implements IAdapterFactory {
+
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if(adaptableObject instanceof JSFProjectsRoot && adapterType == IProject.class) {
+ return ((JSFProjectsRoot)adaptableObject).getAdapter(adapterType);
+ }
+ return null;
+ }
+
+ public Class[] getAdapterList() {
+ return new Class[]{IProject.class};
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectsRootAdapterFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 1 month
JBoss Tools SVN: r18418 - trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-11-05 11:09:54 -0500 (Thu, 05 Nov 2009)
New Revision: 18418
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5093
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java 2009-11-05 15:20:28 UTC (rev 18417)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java 2009-11-05 16:09:54 UTC (rev 18418)
@@ -20,6 +20,7 @@
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.ui.search.ElementQuerySpecification;
import org.eclipse.jdt.ui.search.IMatchPresentation;
import org.eclipse.jdt.ui.search.IQueryParticipant;
@@ -47,6 +48,9 @@
throws CoreException {
if(querySpecification instanceof ElementQuerySpecification){
+ if (!isSearchForReferences(querySpecification.getLimitTo()))
+ return;
+
ElementQuerySpecification qs = (ElementQuerySpecification)querySpecification;
if(qs.getElement() instanceof IMethod || qs.getElement() instanceof IType){
IFile file = (IFile)qs.getElement().getResource();
@@ -60,6 +64,15 @@
}
}
+ public boolean isSearchForReferences(int limitTo) {
+ int maskedLimitTo = limitTo & ~(IJavaSearchConstants.IGNORE_DECLARING_TYPE+IJavaSearchConstants.IGNORE_RETURN_TYPE);
+ if (maskedLimitTo == IJavaSearchConstants.REFERENCES || maskedLimitTo == IJavaSearchConstants.ALL_OCCURRENCES) {
+ return true;
+ }
+
+ return false;
+ }
+
class ELSearcher extends RefactorSearcher{
ISearchRequestor requestor;
ProjectsSet projectSet=null;
15 years, 1 month
JBoss Tools SVN: r18417 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-11-05 10:20:28 -0500 (Thu, 05 Nov 2009)
New Revision: 18417
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5139
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java 2009-11-05 15:11:37 UTC (rev 18416)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java 2009-11-05 15:20:28 UTC (rev 18417)
@@ -424,8 +424,8 @@
} catch (final InterruptedException irex) {
// operation was canceled
}
- SeamUIUtil.waiteForBuild();
- SeamUIUtil.refreshSeamComponentView();
+ //SeamUIUtil.waiteForBuild();
+ //SeamUIUtil.refreshSeamComponentView();
}
public static void invokeRenameSeamContextVariableWizard(String oldName, Shell activeShell) {
@@ -441,8 +441,8 @@
} catch (final InterruptedException irex) {
// operation was canceled
}
- SeamUIUtil.waiteForBuild();
- SeamUIUtil.refreshSeamComponentView();
+ //SeamUIUtil.waiteForBuild();
+ //SeamUIUtil.refreshSeamComponentView();
}
class RenameSeamComponentAction extends Action{
15 years, 1 month
JBoss Tools SVN: r18416 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-11-05 10:11:37 -0500 (Thu, 05 Nov 2009)
New Revision: 18416
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java
Log:
JBIDE-5139
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java 2009-11-05 14:39:41 UTC (rev 18415)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java 2009-11-05 15:11:37 UTC (rev 18416)
@@ -223,13 +223,16 @@
if(o == null) {
((StructuredViewer)viewer).refresh();
} else {
- ((StructuredViewer)viewer).refresh(o);
+ ((StructuredViewer)viewer).refresh(getTreeObject(o));
}
}
});
-
}
+ protected Object getTreeObject(Object source) {
+ return source;
+ }
+
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
this.viewer = viewer;
ResourcesPlugin.getWorkspace().removeResourceChangeListener(listener);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java 2009-11-05 14:39:41 UTC (rev 18415)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java 2009-11-05 15:11:37 UTC (rev 18416)
@@ -14,6 +14,7 @@
import java.util.List;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.jface.viewers.Viewer;
import org.jboss.tools.seam.core.ISeamProject;
@@ -67,13 +68,24 @@
@Override
public Object getParent(Object element) {
- if(element instanceof ISeamProject) {
+ if(element instanceof ISeamProject || element instanceof IProject) {
return root;
} else {
- return super.getParent(element);
+ Object o = super.getParent(element);
+ if(o instanceof ISeamProject) {
+ return ((ISeamProject)o).getProject();
+ }
+ return o;
}
}
+ protected Object getTreeObject(Object source) {
+ if(source instanceof ISeamProject) {
+ return ((ISeamProject)source).getProject();
+ }
+ return source;
+ }
+
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
super.inputChanged(viewer, oldInput, newInput);
15 years, 1 month
JBoss Tools SVN: r18415 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: refactoring and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-11-05 09:39:41 -0500 (Thu, 05 Nov 2009)
New Revision: 18415
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIUtil.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5139
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIUtil.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIUtil.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIUtil.java 2009-11-05 14:39:41 UTC (rev 18415)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.seam.ui;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ui.internal.Workbench;
+import org.eclipse.ui.navigator.CommonNavigator;
+
+/**
+ * @author Daniel Azarov
+ */
+
+public class SeamUIUtil {
+ public static void refreshSeamComponentView(){
+ CommonNavigator navigator = (CommonNavigator)Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().findView("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
+ if(navigator != null)
+ navigator.getCommonViewer().refresh();
+ }
+
+ public static boolean saveAll(){
+ return SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true);
+ }
+
+ public static void waiteForBuild(){
+ try {
+ Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+ } catch (InterruptedException e) {
+ // do nothing
+ }
+ }
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIUtil.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java 2009-11-05 14:25:20 UTC (rev 18414)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java 2009-11-05 14:39:41 UTC (rev 18415)
@@ -78,6 +78,7 @@
import org.jboss.tools.seam.internal.core.refactoring.RenameSeamContextVariableProcessor;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.SeamUIMessages;
+import org.jboss.tools.seam.ui.SeamUIUtil;
import org.jboss.tools.seam.ui.wizard.RenameComponentWizard;
import org.jboss.tools.seam.ui.wizard.RenameSeamContextVariableWizard;
import org.w3c.dom.Node;
@@ -423,6 +424,8 @@
} catch (final InterruptedException irex) {
// operation was canceled
}
+ SeamUIUtil.waiteForBuild();
+ SeamUIUtil.refreshSeamComponentView();
}
public static void invokeRenameSeamContextVariableWizard(String oldName, Shell activeShell) {
@@ -438,6 +441,8 @@
} catch (final InterruptedException irex) {
// operation was canceled
}
+ SeamUIUtil.waiteForBuild();
+ SeamUIUtil.refreshSeamComponentView();
}
class RenameSeamComponentAction extends Action{
15 years, 1 month
JBoss Tools SVN: r18414 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-11-05 09:25:20 -0500 (Thu, 05 Nov 2009)
New Revision: 18414
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1592
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-11-05 12:50:16 UTC (rev 18413)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-11-05 14:25:20 UTC (rev 18414)
@@ -477,6 +477,14 @@
List<Change> changes = super.merge(s);
AbstractTagLib t = (AbstractTagLib)s;
Change children = new Change(this, null, null, null);
+ if(!stringsEqual(uri, t.uri)) {
+ changes = Change.addChange(changes, new Change(this, URI, uri, t.uri));
+ uri = t.uri;
+ }
+ if(!stringsEqual(version, t.version)) {
+ changes = Change.addChange(changes, new Change(this, TLDLibrary.VERSION, version, t.version));
+ version = t.version;
+ }
mergeComponents(t, children);
changes = Change.addChange(changes, children);
15 years, 1 month