JBoss Tools SVN: r4576 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-30 08:25:59 -0400 (Tue, 30 Oct 2007)
New Revision: 4576
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java
Log:
JBIDE-1193
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java 2007-10-30 11:32:54 UTC (rev 4575)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java 2007-10-30 12:25:59 UTC (rev 4576)
@@ -11,12 +11,14 @@
package org.jboss.tools.seam.internal.core;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.jboss.tools.seam.core.IOpenableElement;
import org.jboss.tools.seam.core.ISeamTextSourceReference;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.IValueInfo;
+import org.jboss.tools.seam.core.event.Change;
/**
* @author Viacheslav Kabanovich
@@ -86,4 +88,14 @@
return c;
}
+ public List<Change> merge(SeamObject s) {
+ List<Change> changes = super.merge(s);
+ if(s instanceof AbstractSeamDeclaration) {
+ AbstractSeamDeclaration d = (AbstractSeamDeclaration)s;
+ attributes.clear();
+ attributes.putAll(d.attributes);
+ }
+ return changes;
+ }
+
}
17 years, 2 months
JBoss Tools SVN: r4575 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-10-30 07:32:54 -0400 (Tue, 30 Oct 2007)
New Revision: 4575
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
Fix RichFaces template treeNodesAdaptor
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-30 09:59:13 UTC (rev 4574)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-30 11:32:54 UTC (rev 4575)
@@ -628,23 +628,6 @@
</span>
</vpe:template>
</vpe:tag>
-
- <vpe:tag name="rich:treeNodesAdaptor" case-sensitive="yes">
- <vpe:template children="yes" modify="no"
- class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesTreeNodesAdaptorTemplate">
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="treeNode" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:pseudoContent defaultText="yes" />
- </vpe:template>
- </vpe:tag>
<vpe:tag name="rich:dragListener" case-sensitive="yes">
<vpe:template children="no" modify="yes">
17 years, 2 months
JBoss Tools SVN: r4574 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: widget/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-30 05:59:13 -0400 (Tue, 30 Oct 2007)
New Revision: 4574
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1210
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-10-30 00:40:52 UTC (rev 4573)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-10-30 09:59:13 UTC (rev 4574)
@@ -208,6 +208,8 @@
public static String SEAM_RUNTIME_LIST_FIELD_EDITOR_ALREADY_EXISTS;
public static String SEAM_RUNTIME_LIST_FIELD_EDITOR_AN_INSTANCEOF_OF_LIST;
+
+ public static String SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_FIND_JBOSS_SEAM_JAR;
public static String SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_OBTAIN_SEAM_VERSION_NUMBER;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-10-30 00:40:52 UTC (rev 4573)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-10-30 09:59:13 UTC (rev 4574)
@@ -54,6 +54,7 @@
SEAM_RUNTIME_LIST_FIELD_EDITOR_INPUTELEMENT_MUST_BE=inputElement must be
SEAM_RUNTIME_LIST_FIELD_EDITOR_NAME_CANNOT_BE_EMPTY=Name cannot be empty
SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_READ_JAR_FILE=Cannot read jboss-seam.jar file
+SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_FIND_JBOSS_SEAM_JAR=Cannot find jboss-seam.jar file
SEAM_PROJECT_WIZARD_PAGE1_FILE_EXTENSION_MUST_BE_MPE=File extension must be "mpe"
SEAM_RUNTIME_LIST_FIELD_EDITOR_AN_INSTANCEOF_OF_LIST=an instance of List<SeamRuntime>.
SEAM_RUNTIME_LIST_FIELD_EDITOR_CREATE_A_SEAM_RUNTIME=Create a Seam Runtime
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2007-10-30 00:40:52 UTC (rev 4573)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2007-10-30 09:59:13 UTC (rev 4574)
@@ -399,7 +399,11 @@
}
String seamVersion = getSeamVersion(homeDir.getValueAsString());
- if("".equals(seamVersion)) { //$NON-NLS-1$
+ if(seamVersion == null){
+ setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_FIND_JBOSS_SEAM_JAR);
+ setPageComplete(false);
+ return;
+ }else if("".equals(seamVersion)) { //$NON-NLS-1$
setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_OBTAIN_SEAM_VERSION_NUMBER);
setPageComplete(false);
return;
@@ -426,6 +430,7 @@
File seamJarFile = new File(path, "jboss-seam.jar"); //$NON-NLS-1$
if(!seamJarFile.exists()) {
seamJarFile = new File(path, "lib/jboss-seam.jar"); // hack to make it work for seam2
+ if(!seamJarFile.exists()) return null;
}
InputStream str=null;
ZipFile seamJar;
17 years, 2 months
JBoss Tools SVN: r4573 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-29 20:40:52 -0400 (Mon, 29 Oct 2007)
New Revision: 4573
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java
Log:
JBIDE-1191 remove single file deployments from servers
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java 2007-10-29 23:48:35 UTC (rev 4572)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java 2007-10-30 00:40:52 UTC (rev 4573)
@@ -26,20 +26,30 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.wst.server.core.IModule;
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.ModuleFactory;
import org.eclipse.wst.server.core.internal.ModuleFile;
+import org.eclipse.wst.server.core.internal.PublishServerJob;
import org.eclipse.wst.server.core.internal.ServerPlugin;
import org.eclipse.wst.server.core.model.IModuleResource;
import org.eclipse.wst.server.core.model.ModuleDelegate;
@@ -110,7 +120,10 @@
private HashMap<IPath, IModule> moduleIdToModule;
private HashMap<IModule, SingleDeployableModuleDelegate> moduleToDelegate;
+ private IResourceChangeListener resourceListener;
public SingleDeployableFactory() {
+ resourceListener = new FileDeletionListener();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceListener, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_DELETE);
}
public void initialize() {
@@ -168,6 +181,7 @@
public IModule getModule(IPath path) {
return moduleIdToModule.get(path);
}
+
public void saveDeployableList() {
Iterator<IPath> i = moduleIdToModule.keySet().iterator();
String val = "";
@@ -235,4 +249,70 @@
return workspaceRelative;
}
}
+
+ public class FileDeletionListener implements IResourceChangeListener, IResourceDeltaVisitor {
+ public ArrayList<IPath> list = new ArrayList<IPath>();
+ public void resourceChanged(IResourceChangeEvent event) {
+ try {
+ event.getDelta().accept(this);
+ ArrayList<IPath> clone;
+ if( list.size() > 0 ) {
+ synchronized(this) {
+ clone = new ArrayList<IPath>();
+ clone.addAll(list);
+ list.clear();
+ }
+
+ UndeployFromServerJob job = new UndeployFromServerJob(clone);
+ job.schedule();
+ }
+ } catch( CoreException ce ) {
+ }
+ }
+
+ public boolean visit(IResourceDelta delta) throws CoreException {
+ if( ((delta.getKind() & IResourceDelta.REMOVED) != 0) && delta.getResource() != null && delta.getResource().getFullPath() != null ) {
+ IModule module = getModule(delta.getResource().getFullPath());
+ if( getModule(delta.getResource().getFullPath()) != null && !list.contains(delta.getResource().getFullPath())) {
+ list.add(delta.getResource().getFullPath());
+ }
+ }
+ return true;
+ }
+ }
+
+ public class UndeployFromServerJob extends Job {
+ private ArrayList<IPath> paths;
+ public UndeployFromServerJob(ArrayList<IPath> paths) {
+ super("Undeploy Single Files From Server");
+ this.paths = paths;
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ IPath next;
+ IModule mod;
+ IServer[] allServers = ServerCore.getServers();
+ for( Iterator i = paths.iterator(); i.hasNext(); ) {
+ next = (IPath)i.next();
+ mod = getModule(next);
+ if( mod != null ) {
+ for( int j = 0; j < allServers.length; j++ ) {
+ List l = Arrays.asList(allServers[j].getModules());
+ if( l.contains(mod)) {
+ try {
+ IServerWorkingCopy copy = allServers[j].createWorkingCopy();
+ ServerUtil.modifyModules(copy, new IModule[] {}, new IModule[]{mod}, new NullProgressMonitor());
+ IServer s = copy.save(false, new NullProgressMonitor());
+ new PublishServerJob(s).schedule();
+ } catch( CoreException ce ) {
+ }
+ }
+ }
+ }
+ }
+ return Status.OK_STATUS;
+ }
+
+ }
+
}
17 years, 2 months
JBoss Tools SVN: r4572 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-29 19:48:35 -0400 (Mon, 29 Oct 2007)
New Revision: 4572
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1141 is fixed.
AntCopyUtils.copyFileToFolder() now compares canonical file path before copying.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java 2007-10-29 22:49:28 UTC (rev 4571)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java 2007-10-29 23:48:35 UTC (rev 4572)
@@ -174,7 +174,7 @@
public static void copyFileToFolder(File source, File dest, FilterSetCollection filterSetCollection, boolean override ) {
try {
File destFile = new File(dest,source.getName());
- if(!source.equals(destFile)) {
+ if(!source.getCanonicalPath().equals(destFile.getCanonicalPath())) {
FileUtils.getFileUtils().copyFile(source, destFile ,filterSetCollection,override);
}
} catch (IOException e) {
17 years, 2 months
JBoss Tools SVN: r4571 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server: extensions and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-29 18:49:28 -0400 (Mon, 29 Oct 2007)
New Revision: 4571
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerExtensionFrame.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
Log:
JBIDE-1192 multi-select in server view
Most actions switched over to account for multiple selections.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-10-29 22:48:34 UTC (rev 4570)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-10-29 22:49:28 UTC (rev 4571)
@@ -274,6 +274,17 @@
return ((ContentWrapper)o).getElement();
return o;
}
+
+ public Object[] getRawElements(IStructuredSelection selection) {
+ ArrayList<Object> tmp = new ArrayList<Object>();
+ Object[] obj = selection.toArray();
+ Object tmp2;
+ for( int i = 0; i < obj.length; i++ ) {
+ tmp2 = getRawElement(obj[i]);
+ if( tmp2 != null ) tmp.add(tmp2);
+ }
+ return (Object[]) tmp.toArray(new Object[tmp.size()]);
+ }
public ServerViewProvider getParentViewProvider(Object o) {
if( o instanceof ContentWrapper )
@@ -295,22 +306,32 @@
protected void fillSelectedContextMenu(Shell shell, IMenuManager mgr) {
ISelection sel = getSelection();
- if( sel instanceof IStructuredSelection ) {
- Object selected = ((IStructuredSelection)sel).getFirstElement();
- if( selected != null ) {
- ServerViewProvider provider;
- if( selected instanceof ServerViewProvider ) {
- provider = (ServerViewProvider)selected;
- } else {
- provider = getParentViewProvider(selected);
- }
- if( provider != null )
- provider.getDelegate().fillContextMenu(shell, mgr, getRawElement(selected));
+ if (sel instanceof IStructuredSelection) {
+ ServerViewProvider provider = findProvider((IStructuredSelection)sel);
+ if (provider != null) {
+ Object[] selected = getRawElements((IStructuredSelection)sel);
+ provider.getDelegate().fillContextMenu(shell, mgr, selected);
}
}
+ }
+ protected ServerViewProvider findProvider(IStructuredSelection sel) {
+ Object[] selected = sel.toArray();
+ ServerViewProvider provider = null;
+ ServerViewProvider tmpProvider;
+ for( int i = 0; i < selected.length; i++ ) {
+ if( selected[i] instanceof ServerViewProvider ) {
+ tmpProvider = (ServerViewProvider)selected[i];
+ } else {
+ tmpProvider = getParentViewProvider(selected[i]);
+ }
+ if( provider == null )
+ provider = tmpProvider;
+ else if( tmpProvider != provider )
+ return null;
+ }
+ return provider;
}
-
protected void fillJBContextMenu(Shell shell, IMenuManager menu) {
Object selected = getSelectedElement();
@@ -365,8 +386,10 @@
} else if( page == null ) */ {
page = topLevelPropertiesPage;
}
- page.selectionChanged(part, sel);
- book.showPage(page.getControl());
+ if( page != null ) {
+ page.selectionChanged(part, sel);
+ book.showPage(page.getControl());
+ }
}
}
private IPropertySheetPage getDelegatePage(ServerViewProvider provider) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerExtensionFrame.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerExtensionFrame.java 2007-10-29 22:48:34 UTC (rev 4570)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerExtensionFrame.java 2007-10-29 22:49:28 UTC (rev 4571)
@@ -55,7 +55,7 @@
super(parent, SWT.NONE);
this.view = view;
setLayout(new FillLayout());
- jbTreeTable = new Tree(this, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ jbTreeTable = new Tree(this, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
jbViewer = new ExtensionTableViewer(jbTreeTable);
view.getSite().setSelectionProvider(jbViewer);
addListeners();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-10-29 22:48:34 UTC (rev 4570)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-10-29 22:49:28 UTC (rev 4571)
@@ -76,7 +76,7 @@
}
- public void fillContextMenu(Shell shell, IMenuManager menu, Object selection) {
+ public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selected) {
}
public ITreeContentProvider getContentProvider() {
@@ -157,4 +157,11 @@
protected boolean isJBossServer(IServer server) {
return (JBossServer)server.loadAdapter(JBossServer.class, new NullProgressMonitor()) != null;
}
+
+ protected boolean allAre(Object[] list, Class clazz) {
+ for( int i = 0; i < list.length; i++ )
+ if( list[i].getClass() != clazz )
+ return false;
+ return true;
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java 2007-10-29 22:48:34 UTC (rev 4570)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java 2007-10-29 22:49:28 UTC (rev 4571)
@@ -45,7 +45,7 @@
}
- public abstract void fillContextMenu(Shell shell, IMenuManager menu, Object selection);
+ public abstract void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection);
public abstract ITreeContentProvider getContentProvider();
public abstract LabelProvider getLabelProvider();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2007-10-29 22:48:34 UTC (rev 4570)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2007-10-29 22:49:28 UTC (rev 4571)
@@ -300,15 +300,15 @@
editFileAction.setText("Edit File");
}
- public void fillContextMenu(Shell shell, IMenuManager menu, Object selection) {
- if( selection instanceof ServerViewProvider ) {
+ public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection) {
+ if( selection[0] instanceof ServerViewProvider ) {
menu.add(this.newXPathCategoryAction);
menu.add(new Separator());
return;
}
- if( selection instanceof XPathCategory ) {
- setActiveCategory((XPathCategory)selection);
+ if( selection[0] instanceof XPathCategory ) {
+ setActiveCategory((XPathCategory)selection[0]);
menu.add(this.newXPathAction);
menu.add(this.deleteXPathCategoryAction);
menu.add(new Separator());
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java 2007-10-29 22:48:34 UTC (rev 4570)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java 2007-10-29 22:49:28 UTC (rev 4571)
@@ -90,7 +90,7 @@
private IServer input;
private Action clearLogAction;
- private static HashMap majorTypeToName = new HashMap();
+ private static HashMap<String, String> majorTypeToName = new HashMap<String, String>();
static {
IExtensionRegistry registry = Platform.getExtensionRegistry();
IConfigurationElement[] cf = registry.getConfigurationElementsFor(JBossServerUIPlugin.PLUGIN_ID, "EventLogMajorType");
@@ -130,7 +130,7 @@
return getRootCategories();
Object[] ret = EventLogModel.getModel(input).getRoot().getChildren();
if( getSortOrder()) {
- List l = Arrays.asList(ret);
+ List<Object> l = Arrays.asList(ret);
Collections.reverse(l);
return l.toArray();
}
@@ -140,7 +140,7 @@
if( parentElement instanceof String ) {
// get children only of this type
SimpleTreeItem[] children = EventLogModel.getModel(input).getRoot().getChildren();
- ArrayList items = new ArrayList();
+ ArrayList<SimpleTreeItem> items = new ArrayList<SimpleTreeItem>();
for( int i = 0; i < children.length; i++ ) {
if( children[i] instanceof EventLogTreeItem ) {
String type = ((EventLogTreeItem)children[i]).getEventClass();
@@ -151,7 +151,7 @@
if( getSortOrder() ) Collections.reverse(items);
- return (Object[]) items.toArray(new Object[items.size()]);
+ return items.toArray(new Object[items.size()]);
}
// just return the object's kids
@@ -163,7 +163,7 @@
protected Object[] getRootCategories() {
EventLogRoot root = EventLogModel.getModel(input).getRoot();
- ArrayList majorTypes = new ArrayList();
+ ArrayList<String> majorTypes = new ArrayList<String>();
SimpleTreeItem[] children = root.getChildren();
for( int i = 0; i < children.length; i++ ) {
if( children[i] instanceof EventLogTreeItem ) {
@@ -172,7 +172,7 @@
majorTypes.add(type);
}
}
- return (String[]) majorTypes.toArray(new String[majorTypes.size()]);
+ return majorTypes.toArray(new String[majorTypes.size()]);
}
public Object getParent(Object element) {
@@ -232,7 +232,7 @@
if( !(element instanceof EventLogTreeItem)) {
if( element instanceof String ) {
- String val = (String)majorTypeToName.get(element);
+ String val = majorTypeToName.get(element);
if( val != null ) return val;
}
return element.toString();
@@ -264,8 +264,9 @@
}
}
- public void fillContextMenu(Shell shell, IMenuManager menu, Object selection) {
- menu.add(clearLogAction);
+ public void fillContextMenu(Shell shell, IMenuManager menu, Object selection[]) {
+ if( selection.length == 1 && selection[0] == this.provider)
+ menu.add(clearLogAction);
}
public ITreeContentProvider getContentProvider() {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-10-29 22:48:34 UTC (rev 4570)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-10-29 22:49:28 UTC (rev 4571)
@@ -105,7 +105,7 @@
private FilesetContentProvider contentProvider;
private LabelProvider labelProvider;
private Fileset[] filesets;
- private Object selection;
+ private Object[] selection;
public FilesetViewProvider() {
contentProvider = new FilesetContentProvider();
@@ -143,10 +143,10 @@
createFilter.setText(Messages.FilesetsCreateFilter);
deleteFilter = new Action() {
public void run() {
- if( selection instanceof Fileset ) {
+ if( selection.length == 1 && selection[0] instanceof Fileset ) {
try {
ArrayList<Fileset> asList = new ArrayList<Fileset>(Arrays.asList(filesets));
- asList.remove(selection);
+ asList.remove(selection[0]);
filesets = asList.toArray(new Fileset[asList.size()]);
saveFilesets();
} catch( Exception e ) {
@@ -158,7 +158,8 @@
deleteFilter.setText(Messages.FilesetsDeleteFilter);
editFilter = new Action() {
public void run() {
- Fileset sel = (Fileset)selection;
+ Fileset sel = selection.length == 1 && selection[0] instanceof Fileset ? (Fileset)selection[0] : null;
+ if( sel == null ) return;
FilesetDialog d = new FilesetDialog(new Shell(), sel);
if( d.open() == Window.OK ) {
Fileset ret = d.getFileset();
@@ -175,13 +176,13 @@
public void run() {
try {
Shell shell = JBossServerView.getDefault().getSite().getShell();
- PathWrapper wrapper = (PathWrapper)selection;
- File file = wrapper.getPath().toFile();
+ File[] files = getSelectedFiles();
MessageBox mb = new MessageBox(shell,SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
- mb.setText("Delete File?");
- mb.setMessage("Are you sure you want to delete " + file.getName() + "?");
+ mb.setText("Delete Files?");
+ mb.setMessage("Are you sure you want to delete the selected files?");
if( mb.open() == SWT.OK) {
- FileUtil.safeDelete(file);
+ for( int i = 0; i < files.length; i++ )
+ FileUtil.safeDelete(files[i]);
refreshViewer();
}
} catch( Exception e ) {
@@ -191,37 +192,45 @@
deleteFileAction.setText(Messages.FilesetsDeleteFile);
editFileAction = new Action() {
public void run() {
- try {
- PathWrapper wrapper = (PathWrapper)selection;
- File file = wrapper.getPath().toFile();
- IFile eclipseFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(file.getAbsolutePath()));
-
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
- IWorkbenchPage page = win.getActivePage();
- IFileStore fileStore= EFS.getLocalFileSystem().fromLocalFile(file);
- if( eclipseFile != null ) {
- IEditorInput input = new FileEditorInput(eclipseFile);
- IEditorDescriptor desc = PlatformUI.getWorkbench().
- getEditorRegistry().getDefaultEditor(file.getName());
- if( desc != null )
- page.openEditor(input, desc.getId());
- } else if( fileStore != null ){
- IEditorInput input = new FileStoreEditorInput(fileStore);
- IEditorDescriptor desc = PlatformUI.getWorkbench().
- getEditorRegistry().getDefaultEditor(file.getName());
- if( desc != null )
- page.openEditor(input, desc.getId());
+ File[] files = getSelectedFiles();
+ IWorkbench wb = PlatformUI.getWorkbench();
+ IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
+ IWorkbenchPage page = win.getActivePage();
+ for( int i = 0; i < files.length; i++ ) {
+ try {
+ IFile eclipseFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(files[i].getAbsolutePath()));
+ IFileStore fileStore= EFS.getLocalFileSystem().fromLocalFile(files[i]);
+ if( eclipseFile != null ) {
+ IEditorInput input = new FileEditorInput(eclipseFile);
+ IEditorDescriptor desc = PlatformUI.getWorkbench().
+ getEditorRegistry().getDefaultEditor(files[i].getName());
+ if( desc != null )
+ page.openEditor(input, desc.getId());
+ } else if( fileStore != null ){
+ IEditorInput input = new FileStoreEditorInput(fileStore);
+ IEditorDescriptor desc = PlatformUI.getWorkbench().
+ getEditorRegistry().getDefaultEditor(files[i].getName());
+ if( desc != null )
+ page.openEditor(input, desc.getId());
+ }
+ } catch( Exception e ) {
+ IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, "Cannot open file", e);
+ JBossServerUIPlugin.getDefault().getLog().log(status);
}
- } catch( Exception e ) {
- IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, "Cannot open file", e);
- JBossServerUIPlugin.getDefault().getLog().log(status);
}
}
};
editFileAction.setText(Messages.FilesetsEditFile);
}
+ protected File[] getSelectedFiles() {
+ ArrayList<File> tmp = new ArrayList<File>();
+ for( int i = 0; i < selection.length; i++ ) {
+ tmp.add(((PathWrapper)selection[i]).getPath().toFile());
+ }
+ return (File[]) tmp.toArray(new File[tmp.size()]);
+ }
+
public static class PathWrapper {
private IPath path;
private IPath folder;
@@ -496,37 +505,61 @@
}
- public void fillContextMenu(Shell shell, IMenuManager menu, Object selection) {
+ public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection) {
this.selection = selection;
- if( selection instanceof ServerViewProvider ) {
+ if( selection.length == 1 && selection[0] instanceof ServerViewProvider ) {
menu.add(createFilter);
- } else if( selection instanceof Fileset ) {
+ } else if( selection.length == 1 && selection[0] instanceof Fileset ) {
menu.add(editFilter);
menu.add(deleteFilter);
- } else if( selection instanceof PathWrapper ) {
- File file = ((PathWrapper)selection).getPath().toFile();
- IFile eclipseFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(file.getAbsolutePath()));
- IFileStore fileStore= EFS.getLocalFileSystem().fromLocalFile(file);
- boolean editable = false;
- if( eclipseFile != null ) {
- IEditorInput input = new FileEditorInput(eclipseFile);
- IEditorDescriptor desc = PlatformUI.getWorkbench().
- getEditorRegistry().getDefaultEditor(file.getName());
- if( input != null && desc != null )
- editable = true;
- } else if( fileStore != null ){
- IEditorInput input = new FileStoreEditorInput(fileStore);
- IEditorDescriptor desc = PlatformUI.getWorkbench().
- getEditorRegistry().getDefaultEditor(file.getName());
- if( input != null && desc != null )
- editable = true;
- }
- editFileAction.setEnabled(editable);
- deleteFileAction.setEnabled(file.exists());
+ } else if( allPathWrappers(selection) ) {
+ editFileAction.setEnabled(canEdit(selection));
+ deleteFileAction.setEnabled(canDelete(selection));
menu.add(editFileAction);
menu.add(deleteFileAction);
}
}
+
+ protected boolean allPathWrappers(Object[] list) {
+ boolean result = true;
+ for( int i = 0; i < list.length; i++ )
+ result &= list[i] instanceof PathWrapper;
+ return result;
+ }
+
+ protected boolean canDelete(Object[] list ) {
+ boolean result = true;
+ for( int i = 0; i < list.length; i++ )
+ result &= ((PathWrapper)selection[i]).getPath().toFile().exists();
+ return result;
+ }
+
+ protected boolean canEdit(Object[] list) {
+ for( int i = 0; i < list.length; i++ )
+ if( canEdit(((PathWrapper)selection[i]).getPath().toFile()))
+ return true;
+ return false;
+ }
+
+ protected boolean canEdit(File file) {
+ IFile eclipseFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(file.getAbsolutePath()));
+ IFileStore fileStore= EFS.getLocalFileSystem().fromLocalFile(file);
+ boolean editable = false;
+ if( eclipseFile != null ) {
+ IEditorInput input = new FileEditorInput(eclipseFile);
+ IEditorDescriptor desc = PlatformUI.getWorkbench().
+ getEditorRegistry().getDefaultEditor(file.getName());
+ if( input != null && desc != null )
+ editable = true;
+ } else if( fileStore != null ){
+ IEditorInput input = new FileStoreEditorInput(fileStore);
+ IEditorDescriptor desc = PlatformUI.getWorkbench().
+ getEditorRegistry().getDefaultEditor(file.getName());
+ if( input != null && desc != null )
+ editable = true;
+ }
+ return editable;
+ }
public ITreeContentProvider getContentProvider() {
return contentProvider;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java 2007-10-29 22:48:34 UTC (rev 4570)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java 2007-10-29 22:49:28 UTC (rev 4571)
@@ -110,24 +110,25 @@
}
- public void fillContextMenu(Shell shell, IMenuManager menu, Object selection) {
- final Object selected = selection;
- if( selection instanceof ServerViewProvider && selection != this.provider) {
+ public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection) {
+ final Object[] selected = selection;
+ boolean allProviders = true;
+ for( int i = 0; i < selected.length; i++ )
+ allProviders = allProviders && selected[i] instanceof ServerViewProvider
+ && selected[i] != this.provider;
+
+ if( allProviders) {
Action act = new Action() {
public void run() {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- if( selected instanceof ServerViewProvider) {
- ((ServerViewProvider)selected).setEnabled(true);
- ((ServerViewProvider)selected).getDelegate().getContentProvider().
+ for( int i = 0; i < selected.length; i++ ) {
+ ((ServerViewProvider)selected[i]).setEnabled(true);
+ ((ServerViewProvider)selected[i]).getDelegate().getContentProvider().
inputChanged(JBossServerView.getDefault().getServerFrame().getViewer(), null, JBossServerView.getDefault().getSelectedServer());
-
- try {
- JBossServerView.getDefault().getServerFrame().getViewer().refresh();
- } catch(Exception e) {
- }
}
- }
+ JBossServerView.getDefault().getExtensionFrame().getViewer().refresh();
+ }
} );
}
};
@@ -135,6 +136,10 @@
menu.add(act);
}
}
+
+ public void fillContextMenu(Shell shell, IMenuManager menu, Object selection) {
+ fillContextMenu(shell, menu, new Object[] { selection });
+ }
public ITreeContentProvider getContentProvider() {
return contentProvider;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-10-29 22:48:34 UTC (rev 4570)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-10-29 22:49:28 UTC (rev 4571)
@@ -21,13 +21,11 @@
*/
package org.jboss.ide.eclipse.as.ui.views.server.providers;
+import java.util.ArrayList;
import java.util.Properties;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -44,13 +42,13 @@
import org.eclipse.wst.server.core.ServerEvent;
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.model.ServerBehaviourDelegate;
import org.eclipse.wst.server.ui.ServerUICore;
import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
import org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
@@ -66,7 +64,7 @@
private ModuleContentProvider contentProvider;
private ModuleLabelProvider labelProvider;
private Action deleteModuleAction, fullPublishModuleAction, incrementalPublishModuleAction;
- private ModuleServer selection;
+ private ModuleServer[] selection;
private IServerLifecycleListener serverResourceListener;
private IServerListener serverListener;
@@ -83,19 +81,22 @@
if (MessageDialog.openConfirm(new Shell(), Messages.ServerDialogHeading, Messages.DeleteModuleConfirm)) {
Thread t = new Thread() { public void run() {
try {
- IServerWorkingCopy server = selection.server.createWorkingCopy();
-
- if( ServerConverter.getDeployableServer(selection.server) != null ) {
- ServerUtil.modifyModules(server, new IModule[0], selection.module, new NullProgressMonitor());
- IServer server2 = server.save(true, null);
- ServerConverter.getDeployableServerBehavior(selection.server)
- .publishOneModule(IServer.PUBLISH_INCREMENTAL, selection.module, ServerBehaviourDelegate.REMOVED, new NullProgressMonitor());
- } else {
- ServerUtil.modifyModules(server, new IModule[0], selection.module, new NullProgressMonitor());
- IServer server2 = server.save(true, null);
- server2.publish(IServer.PUBLISH_INCREMENTAL, new NullProgressMonitor());
+ if( selection.length > 0 && selection[0].server != null ) {
+ IServer server = selection[0].server;
+ ArrayList topModsToRemove = new ArrayList();
+ IModule topModTmp;
+ for( int i = 0; i < selection.length; i++ ) {
+ if( !topModsToRemove.contains(selection[i].module[0]))
+ topModsToRemove.add(selection[i].module[0]);
+ }
+ IServerWorkingCopy serverWC = server.createWorkingCopy();
+ IModule[] modsToRemove =
+ (IModule[]) topModsToRemove.toArray(new IModule[topModsToRemove.size()]);
+ ServerUtil.modifyModules(serverWC, new IModule[0], modsToRemove, new NullProgressMonitor());
+ IServer server2 = serverWC.save(true, null);
+ new PublishServerJob(server2, IServer.PUBLISH_INCREMENTAL, true).schedule();
}
- } catch (Exception e) {
+ } catch (CoreException e) {
// ignore
}
}};
@@ -109,7 +110,7 @@
fullPublishModuleAction = new Action() {
public void run() {
- actionPublish(IServer.PUBLISH_FULL);
+ actionPublish(IServer.PUBLISH_STATE_FULL);
}
};
fullPublishModuleAction.setText(Messages.FullPublishModuleText);
@@ -119,7 +120,7 @@
incrementalPublishModuleAction = new Action() {
public void run() {
- actionPublish(IServer.PUBLISH_INCREMENTAL);
+ actionPublish(IServer.PUBLISH_STATE_INCREMENTAL);
}
};
incrementalPublishModuleAction.setText(Messages.IncrementalPublishModuleText);
@@ -127,33 +128,25 @@
incrementalPublishModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.PUBLISH_IMAGE));
}
- protected void actionPublish(final int type) {
- try {
- if( ServerConverter.getDeployableServer(selection.server) != null ) {
- new Job("Publish One Module To Server") {
- protected IStatus run(IProgressMonitor monitor) {
- ServerConverter.getDeployableServerBehavior(selection.server)
- .publishOneModule(type, selection.module,
- ServerBehaviourDelegate.CHANGED, new NullProgressMonitor());
- return Status.OK_STATUS;
- }
- }.schedule();
- } else {
- // can't do anything special here, sadly
- new PublishServerJob(selection.server, type, true).schedule();
+ protected void actionPublish(int type) {
+ // Assumption: Anything selected is already on the server, or it wouldnt be in the view.
+ if( selection != null && selection.length > 0 ) {
+ Server s = ((Server)selection[0].server);
+ for( int i = 0; i < selection.length; i++ ) {
+ s.setModulePublishState(selection[i].module, type);
}
- } catch( Exception e ) {
- // ignore
- JBossServerUIPlugin.log("Error running publish action", e);
+ new PublishServerJob(s, IServer.PUBLISH_INCREMENTAL, true).schedule();
}
}
- public void fillContextMenu(Shell shell, IMenuManager menu, Object selection) {
- if( selection instanceof ModuleServer) {
- this.selection = (ModuleServer)selection;
- if( this.selection.module.length == 1 )
- menu.add(deleteModuleAction);
+ public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection) {
+ if( allAre(selection, ModuleServer.class)) {
+ ModuleServer[] ms = new ModuleServer[selection.length];
+ for( int i = 0; i < selection.length; i++ )
+ ms[i] = (ModuleServer)selection[i];
+ this.selection = ms;
+ menu.add(deleteModuleAction);
menu.add(fullPublishModuleAction);
menu.add(incrementalPublishModuleAction);
}
@@ -250,7 +243,7 @@
return ms.module[size - 1].getName();
}
- return "garbage";
+ return "unknown";
}
public Image getImage(Object obj) {
if( obj instanceof ModuleServer ) {
17 years, 2 months
JBoss Tools SVN: r4570 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-29 18:48:34 -0400 (Mon, 29 Oct 2007)
New Revision: 4570
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
Log:
JSTPublisher was ignoring module publish state
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-10-29 18:36:16 UTC (rev 4569)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-10-29 22:48:34 UTC (rev 4570)
@@ -105,12 +105,12 @@
if (ServerBehaviourDelegate.REMOVED == deltaKind) {
status = unpublish(server, module, monitor);
- } else if (kind == IServer.PUBLISH_FULL || kind == IServer.PUBLISH_CLEAN) {
+ } else if (kind == IServer.PUBLISH_FULL || modulePublishState == IServer.PUBLISH_STATE_FULL || kind == IServer.PUBLISH_CLEAN ) {
if( deleted )
publishState = IServer.PUBLISH_STATE_UNKNOWN;
else
status = fullPublish(module, module[module.length-1], monitor);
- } else if (kind == IServer.PUBLISH_INCREMENTAL || kind == IServer.PUBLISH_AUTO) {
+ } else if (kind == IServer.PUBLISH_INCREMENTAL || modulePublishState == IServer.PUBLISH_STATE_INCREMENTAL || kind == IServer.PUBLISH_AUTO) {
if( deleted )
publishState = IServer.PUBLISH_STATE_UNKNOWN;
else
17 years, 2 months
JBoss Tools SVN: r4569 - in trunk/hibernatetools/plugins: org.hibernate.eclipse/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-29 14:36:16 -0400 (Mon, 29 Oct 2007)
New Revision: 4569
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-commons-annotations.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-search.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-validator.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/lucene-core-2.2.0.jar
Removed:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/lucene-core-2.0.0.jar
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath
trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/ejb3-persistence.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-annotations.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-entitymanager.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate3.jar
Log:
Updated hibernate annotations libs to latest incarnation (3.3) core is still 3.2
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2007-10-29 17:43:17 UTC (rev 4568)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2007-10-29 18:36:16 UTC (rev 4569)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-search.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/lucene-core-2.2.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/asm.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/asm-attrs.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/commons-collections-2.1.1.jar"/>
@@ -8,7 +10,7 @@
<classpathentry exported="true" kind="lib" path="lib/hibernate/concurrent-1.3.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/connector.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/dom4j-1.6.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/hibernate3.jar" sourcepath="/Hibernate3"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/hibernate3.jar" sourcepath="/hibernate-3.2"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-cache.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-common.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-jmx.jar"/>
@@ -20,7 +22,7 @@
<classpathentry exported="true" kind="lib" path="lib/hibernate/oscache-2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/proxool-0.8.3.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/swarmcache-1.0rc2.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/tools/hibernate-tools.jar" sourcepath="/HibernateExt/tools/src/java"/>
+ <classpathentry exported="true" kind="lib" path="lib/tools/hibernate-tools.jar" sourcepath="/hibernateext.tools"/>
<classpathentry exported="true" kind="lib" path="lib/tools/freemarker.jar"/>
<classpathentry exported="true" kind="lib" path="lib/bsh-core-2.0b4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/annotations/ejb3-persistence.jar"/>
@@ -28,13 +30,14 @@
<classpathentry exported="true" kind="lib" path="lib/hibernate/cglib-2.1.3.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/jgroups-2.2.8.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/antlr-2.7.6.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/annotations/lucene-core-2.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/tools/jtidy-r8-20060801.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-entitymanager.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-entitymanager.jar" sourcepath="/hibernateext.entitymanager"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/javassist.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/ehcache-1.2.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/c3p0-0.9.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-commons-annotations.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-validator.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="lib" path="lib/hibernate/c3p0-0.9.1.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2007-10-29 17:43:17 UTC (rev 4568)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2007-10-29 18:36:16 UTC (rev 4569)
@@ -32,17 +32,19 @@
lib/hibernate/cglib-2.1.3.jar,
lib/hibernate/jgroups-2.2.8.jar,
lib/hibernate/antlr-2.7.6.jar,
- lib/annotations/lucene-core-2.0.0.jar,
lib/tools/jtidy-r8-20060801.jar,
lib/annotations/hibernate-entitymanager.jar,
lib/hibernate/javassist.jar,
lib/hibernate/ehcache-1.2.3.jar,
- lib/hibernate/c3p0-0.9.1.jar
+ lib/hibernate/c3p0-0.9.1.jar,
+ lib/annotations/hibernate-commons-annotations.jar,
+ lib/annotations/hibernate-validator.jar,
+ lib/annotations/hibernate-search.jar,
+ lib/annotations/lucene-core-2.2.0.jar
Bundle-Activator: org.hibernate.eclipse.HibernatePlugin
Bundle-Vendor: Hibernate Team
Bundle-Localization: plugin
Export-Package: EDU.oswego.cs.dl.util.concurrent,
- META-INF,
antlr,
antlr.ASdebug,
antlr.actions.cpp,
@@ -231,6 +233,8 @@
org.apache.lucene.index,
org.apache.lucene.queryParser,
org.apache.lucene.search,
+ org.apache.lucene.search.function,
+ org.apache.lucene.search.payloads,
org.apache.lucene.search.spans,
org.apache.lucene.store,
org.apache.lucene.util,
@@ -251,8 +255,13 @@
org.dom4j.xpp,
org.hibernate,
org.hibernate.action,
- org.hibernate.annotationfactory,
org.hibernate.annotations,
+ org.hibernate.annotations.common,
+ org.hibernate.annotations.common.annotationfactory,
+ org.hibernate.annotations.common.reflection,
+ org.hibernate.annotations.common.reflection.java,
+ org.hibernate.annotations.common.reflection.java.generics,
+ org.hibernate.annotations.common.util,
org.hibernate.bytecode,
org.hibernate.bytecode.cglib,
org.hibernate.bytecode.javassist,
@@ -261,6 +270,7 @@
org.hibernate.cache.entry,
org.hibernate.cfg,
org.hibernate.cfg.annotations,
+ org.hibernate.cfg.annotations.reflection,
org.hibernate.cfg.reveng,
org.hibernate.cfg.reveng.dialect,
org.hibernate.classic,
@@ -332,21 +342,24 @@
org.hibernate.proxy.pojo,
org.hibernate.proxy.pojo.cglib,
org.hibernate.proxy.pojo.javassist,
- org.hibernate.reflection,
- org.hibernate.reflection.java,
- org.hibernate.reflection.java.generics,
- org.hibernate.reflection.java.xml,
org.hibernate.search,
org.hibernate.search.annotations,
org.hibernate.search.backend,
org.hibernate.search.backend.impl,
+ org.hibernate.search.backend.impl.jms,
+ org.hibernate.search.backend.impl.lucene,
org.hibernate.search.bridge,
org.hibernate.search.bridge.builtin,
org.hibernate.search.engine,
org.hibernate.search.event,
+ org.hibernate.search.filter,
org.hibernate.search.impl,
+ org.hibernate.search.jpa,
+ org.hibernate.search.jpa.impl,
org.hibernate.search.query,
+ org.hibernate.search.reader,
org.hibernate.search.store,
+ org.hibernate.search.store.optimization,
org.hibernate.search.util,
org.hibernate.secure,
org.hibernate.sql,
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2007-10-29 17:43:17 UTC (rev 4568)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2007-10-29 18:36:16 UTC (rev 4569)
@@ -9,7 +9,11 @@
lib/annotations/hibernate-entitymanager.jar,\
lib/hibernate/javassist.jar,\
lib/hibernate/ehcache-1.2.3.jar,\
- lib/hibernate/c3p0-0.9.1.jar
+ lib/hibernate/c3p0-0.9.1.jar,\
+ lib/annotations/hibernate-commons-annotations.jar,\
+ lib/annotations/hibernate-validator.jar,\
+ lib/annotations/hibernate-search.jar,\
+ lib/annotations/lucene-core-2.2.0.jar
jars.compile.order = org.hibernate.eclipse.jar
source.org.hibernate.eclipse.jar = src/
output.org.hibernate.eclipse.jar = bin/
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/ejb3-persistence.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-annotations.jar
===================================================================
(Binary files differ)
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-commons-annotations.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-commons-annotations.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-entitymanager.jar
===================================================================
(Binary files differ)
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-search.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-search.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-validator.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-validator.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/lucene-core-2.0.0.jar
===================================================================
(Binary files differ)
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/lucene-core-2.2.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/lucene-core-2.2.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate3.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF 2007-10-29 17:43:17 UTC (rev 4568)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF 2007-10-29 18:36:16 UTC (rev 4569)
@@ -35,6 +35,7 @@
org.hibernate.eclipse.graph.parts,
org.hibernate.eclipse.graph.policy,
org.hibernate.eclipse.hqleditor,
+ org.hibernate.eclipse.hqleditor.preferences,
org.hibernate.eclipse.launch,
org.hibernate.eclipse.nature,
org.hibernate.eclipse.util.xpl
17 years, 2 months
JBoss Tools SVN: r4568 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-29 13:43:17 -0400 (Mon, 29 Oct 2007)
New Revision: 4568
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1193
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-10-29 17:25:18 UTC (rev 4567)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-10-29 17:43:17 UTC (rev 4568)
@@ -33,7 +33,7 @@
UNKNOWN_FACTORY_NAME=Factory method "{0}" with a void return type must have an associated @Out/Databinder
#Bijections
-MULTIPLE_DATA_BINDER=@DataModelSelection and @DataModelSelectionIndex without name requires the only one @DataModel in the component
+MULTIPLE_DATA_BINDER=@DataModelSelection and @DataModelSelectionIndex without name of the DataModel requires the only one @DataModel in the component
UNKNOWN_DATA_MODEL=Unknown @DataModel/@Out name: {0}
#Context variables
17 years, 2 months
JBoss Tools SVN: r4567 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-29 13:25:18 -0400 (Mon, 29 Oct 2007)
New Revision: 4567
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1193
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2007-10-29 17:16:38 UTC (rev 4566)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2007-10-29 17:25:18 UTC (rev 4567)
@@ -586,10 +586,12 @@
} else {
// save link between java source and Data Model name
validationContext.addLinkedCoreResource(dataModelName, declaration.getSourcePath());
- Set<IBijectedAttribute> dataBinders = declaration.getBijectedAttributesByName(selectionName);
- for (IBijectedAttribute dataBinder : dataBinders) {
- if(dataBinder.isOfType(BijectedAttributeType.DATA_BINDER) || dataBinder.isOfType(BijectedAttributeType.OUT)) {
- return;
+ Set<IBijectedAttribute> dataBinders = declaration.getBijectedAttributesByName(dataModelName);
+ if(dataBinders!=null) {
+ for (IBijectedAttribute dataBinder : dataBinders) {
+ if(dataBinder.isOfType(BijectedAttributeType.DATA_BINDER) || dataBinder.isOfType(BijectedAttributeType.OUT)) {
+ return;
+ }
}
}
addError(UNKNOWN_DATA_MODEL_MESSAGE_ID, SeamPreferences.UNKNOWN_DATA_MODEL, new String[]{dataModelName}, coreHelper.getLocationOfAttribute(bijection, DataModelSelectionAttribute.VALUE), declaration.getResource());
17 years, 2 months