JBoss Tools SVN: r4526 - in trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model: internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-25 20:12:12 -0400 (Thu, 25 Oct 2007)
New Revision: 4526
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModelCore.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/DirectoryScannerFactory.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java
Log:
JBIDE-1164
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModelCore.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModelCore.java 2007-10-25 22:19:17 UTC (rev 4525)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModelCore.java 2007-10-26 00:12:12 UTC (rev 4526)
@@ -24,8 +24,11 @@
import org.apache.tools.ant.DirectoryScanner;
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.jboss.ide.eclipse.archives.core.ArchivesCorePlugin;
import org.jboss.ide.eclipse.archives.core.build.ArchiveBuildDelegate;
/**
@@ -88,14 +91,20 @@
public static IPath[] findMatchingPaths(IPath root, String includes, String excludes) {
- DirectoryScanner scanner =
- DirectoryScannerFactory.createDirectoryScanner(root, includes, excludes, true);
- String[] files = scanner.getIncludedFiles();
- IPath[] paths = new IPath[files.length];
- for( int i = 0; i < files.length; i++ ) {
- paths[i] = new Path(files[i]);
+ try {
+ DirectoryScanner scanner =
+ DirectoryScannerFactory.createDirectoryScanner(root, includes, excludes, true);
+ String[] files = scanner.getIncludedFiles();
+ IPath[] paths = new IPath[files.length];
+ for( int i = 0; i < files.length; i++ ) {
+ paths[i] = new Path(files[i]);
+ }
+ return paths;
+ } catch( IllegalStateException ise ) {
+ IStatus status = new Status(IStatus.WARNING, ArchivesCorePlugin.PLUGIN_ID, "Error creating directory scanner", ise);
+ ArchivesCorePlugin.getDefault().getLog().log(status);
+ return new IPath[]{};
}
- return paths;
}
}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/DirectoryScannerFactory.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/DirectoryScannerFactory.java 2007-10-25 22:19:17 UTC (rev 4525)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/DirectoryScannerFactory.java 2007-10-26 00:12:12 UTC (rev 4526)
@@ -22,8 +22,6 @@
package org.jboss.ide.eclipse.archives.core.model;
import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
import org.apache.tools.ant.DirectoryScanner;
import org.eclipse.core.runtime.IPath;
@@ -46,8 +44,9 @@
scanner.setBasedir(basedir);
scanner.setExcludes(excludesList);
scanner.setIncludes(includesList);
- if (scan)
+ if (scan) {
scanner.scan();
+ }
return scanner;
}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java 2007-10-25 22:19:17 UTC (rev 4525)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java 2007-10-26 00:12:12 UTC (rev 4526)
@@ -25,7 +25,10 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.jboss.ide.eclipse.archives.core.ArchivesCorePlugin;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension;
@@ -71,7 +74,7 @@
*/
public synchronized IPath[] findMatchingPaths () {
getScanner(); // ensure up to date
- return (IPath[]) matchingPaths.toArray(new IPath[matchingPaths.size()]);
+ return matchingPaths == null ? new IPath[0] : (IPath[]) matchingPaths.toArray(new IPath[matchingPaths.size()]);
}
/*
@@ -139,20 +142,24 @@
if( scanner == null || rescanRequired) {
rescanRequired = false;
- // new scanner
- scanner = DirectoryScannerFactory.createDirectoryScanner(
- getGlobalSourcePath(), getIncludesPattern(), getExcludesPattern(), true);
-
- // cache the paths
- ArrayList paths = new ArrayList();
- IPath sp = getGlobalSourcePath();
- String matched[] = scanner.getIncludedFiles();
- for (int i = 0; i < matched.length; i++) {
- IPath path = sp.append(new Path(matched[i]));
- paths.add(path);
+ try {
+ // new scanner
+ scanner = DirectoryScannerFactory.createDirectoryScanner(
+ getGlobalSourcePath(), getIncludesPattern(), getExcludesPattern(), true);
+
+ // cache the paths
+ ArrayList paths = new ArrayList();
+ IPath sp = getGlobalSourcePath();
+ String matched[] = scanner.getIncludedFiles();
+ for (int i = 0; i < matched.length; i++) {
+ IPath path = sp.append(new Path(matched[i]));
+ paths.add(path);
+ }
+ matchingPaths = paths;
+ } catch( IllegalStateException ise ) {
+ IStatus status = new Status(IStatus.WARNING, ArchivesCorePlugin.PLUGIN_ID, "Could not create directory scanner", ise);
+ ArchivesCorePlugin.getDefault().getLog().log(status);
}
-
- matchingPaths = paths;
}
return scanner;
}
17 years, 2 months
JBoss Tools SVN: r4525 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-25 18:19:17 -0400 (Thu, 25 Oct 2007)
New Revision: 4525
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-1183
jst.java 6.0 supported
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-10-25 22:17:04 UTC (rev 4524)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-10-25 22:19:17 UTC (rev 4525)
@@ -354,7 +354,7 @@
id="org.jboss.ide.eclipse.as.runtime.component"
version="3.2"/>
<facet id="jst.web" version="2.2,2.3,2.4"/>
- <facet id="jst.java" version="1.3,1.4,5.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.ejb" version="2.0,2.1"/>
<facet id="jst.ear" version="1.2,1.3,1.4"/>
@@ -367,7 +367,7 @@
id="org.jboss.ide.eclipse.as.runtime.component"
version="4.0"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
<facet id="jst.ear" version="1.2,1.3,1.4,5.0"/>
@@ -379,7 +379,7 @@
id="org.jboss.ide.eclipse.as.runtime.component"
version="4.2"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
<facet id="jst.ear" version="1.2,1.3,1.4,5.0"/>
17 years, 2 months
JBoss Tools SVN: r4524 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-25 18:17:04 -0400 (Thu, 25 Oct 2007)
New Revision: 4524
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
Log:
slight UI error
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2007-10-25 22:04:40 UTC (rev 4523)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2007-10-25 22:17:04 UTC (rev 4524)
@@ -143,6 +143,7 @@
FormData buttonData = new FormData();
buttonData.right = new FormAttachment(100,-5);
+ buttonData.left = new FormAttachment(text, 5);
buttonData.top = new FormAttachment(descriptionLabel,5);
button.setLayoutData(buttonData);
@@ -160,6 +161,7 @@
FormData tempButtonData = new FormData();
tempButtonData.right = new FormAttachment(100,-5);
+ tempButtonData.left = new FormAttachment(tempDeployText,5);
tempButtonData.top = new FormAttachment(text,5);
tempDeployButton.setLayoutData(tempButtonData);
17 years, 2 months
JBoss Tools SVN: r4523 - in trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src: main/org/jboss/ide/eclipse/archives/core/build and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-25 18:04:40 -0400 (Thu, 25 Oct 2007)
New Revision: 4523
Added:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/WorkspaceChangeListener.java
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/ArchivesCorePlugin.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ModelChangeListener.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveNodeDelta.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java
Log:
JBIDE-1165
Awesome impl ;)
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/ArchivesCorePlugin.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/ArchivesCorePlugin.java 2007-10-25 18:32:27 UTC (rev 4522)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/ArchivesCorePlugin.java 2007-10-25 22:04:40 UTC (rev 4523)
@@ -22,6 +22,7 @@
package org.jboss.ide.eclipse.archives.core;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Plugin;
import org.jboss.ide.eclipse.archives.core.model.internal.xb.XMLBinding;
import org.osgi.framework.BundleContext;
@@ -30,7 +31,8 @@
* The activator class controls the plug-in life cycle
* @author rstryker
*
- */public class ArchivesCorePlugin extends Plugin {
+ */
+public class ArchivesCorePlugin extends Plugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.ide.eclipse.archives.core";
@@ -54,6 +56,7 @@
// Load the workspace version of ArchivesCore
ArchivesCore core = new WorkspaceArchivesCore();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(new WorkspaceChangeListener());
}
/*
Added: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/WorkspaceChangeListener.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/WorkspaceChangeListener.java (rev 0)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/WorkspaceChangeListener.java 2007-10-25 22:04:40 UTC (rev 4523)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.archives.core;
+
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.resources.IProject;
+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.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.jboss.ide.eclipse.archives.core.model.ArchivesModel;
+
+/**
+ * Update the model if someone changes the packaging file by hand
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
+public class WorkspaceChangeListener implements IResourceChangeListener {
+
+ public void resourceChanged(IResourceChangeEvent event) {
+ final Set projects = new TreeSet();
+
+ IResourceDelta delta = event.getDelta();
+ try {
+ delta.accept(new IResourceDeltaVisitor() {
+ public boolean visit(IResourceDelta delta) throws CoreException {
+ if( delta.getResource() != null && delta.getResource().getLocation().lastSegment().equals(ArchivesModel.PROJECT_PACKAGES_FILE)) {
+ projects.add(delta.getResource().getProject());
+ }
+ return true;
+ }
+ });
+ } catch( CoreException ce ) {
+ }
+ Iterator i = projects.iterator();
+ while(i.hasNext()) {
+ final IProject p = (IProject)i.next();
+ ArchivesModel.instance().registerProject(p.getLocation(), new NullProgressMonitor());
+ new Job("Refresh Project: " + p.getName()) {
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ p.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ } catch( CoreException e ) {
+ IStatus status = new Status(IStatus.WARNING, ArchivesCorePlugin.PLUGIN_ID, "Could not refresh project " + p.getName(), e);
+ return status;
+ }
+ return Status.OK_STATUS;
+ }
+ }.schedule();
+ }
+ }
+
+}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ModelChangeListener.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ModelChangeListener.java 2007-10-25 18:32:27 UTC (rev 4522)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ModelChangeListener.java 2007-10-25 22:04:40 UTC (rev 4523)
@@ -6,6 +6,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveModelNode;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNodeDelta;
import org.jboss.ide.eclipse.archives.core.model.events.EventManager;
@@ -59,9 +60,11 @@
if( isTopLevelArchive(delta.getPostNode()))
EventManager.startedBuildingArchive((IArchive)delta.getPostNode());
-
- if( (delta.getKind() & IArchiveNodeDelta.REMOVED) != 0 ) {
+ if( (delta.getKind() & IArchiveNodeDelta.UNKNOWN_CHANGE) != 0 ) {
nodeRemoved(delta.getPreNode());
+ nodeAdded(delta.getPostNode());
+ } if( (delta.getKind() & IArchiveNodeDelta.REMOVED) != 0 ) {
+ nodeRemoved(delta.getPreNode());
} else if( (delta.getKind() & IArchiveNodeDelta.ADDED) != 0 ) {
nodeAdded(delta.getPostNode());
} else if( (delta.getKind() & IArchiveNodeDelta.ATTRIBUTE_CHANGED) != 0) {
@@ -136,11 +139,18 @@
private void nodeAdded(IArchiveNode added) {
- if( added.getNodeType() == IArchiveNode.TYPE_ARCHIVE) {
+ if( added == null ) return;
+
+ if( added.getNodeType() == IArchiveNode.TYPE_MODEL) {
+ IArchiveNode[] archives = ((IArchiveModelNode)added).getChildren(IArchiveNode.TYPE_ARCHIVE);
+ for( int i = 0; i < archives.length; i++ ) {
+ nodeAdded(archives[i]);
+ }
+ } else if( added.getNodeType() == IArchiveNode.TYPE_ARCHIVE) {
// create the package
ModelTruezipBridge.createFile(added);
} else if( added.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FOLDER ) {
- // create hte folder
+ // create the folder
ModelTruezipBridge.createFile(added);
}
IArchiveFileSet[] filesets = ModelUtil.findAllDescendentFilesets(added);
@@ -154,7 +164,16 @@
private void nodeRemoved(IArchiveNode removed) {
- if( removed.getNodeType() == IArchiveNode.TYPE_ARCHIVE) {
+ if( removed == null ) return;
+ if( removed.getNodeType() == IArchiveNode.TYPE_MODEL ) {
+ // remove all top level items
+ IArchiveNode[] kids = removed.getChildren(IArchiveNode.TYPE_ARCHIVE);
+ for( int i = 0; i < kids.length; i++ ) {
+ ModelTruezipBridge.deleteArchive((IArchive)kids[i]);
+ }
+ postChange(removed);
+ return;
+ } else if( removed.getNodeType() == IArchiveNode.TYPE_ARCHIVE) {
ModelTruezipBridge.deleteArchive((IArchive)removed);
postChange(removed);
return;
@@ -166,7 +185,7 @@
}
postChange(removed);
return;
- }
+ }
IArchiveFileSet[] filesets = ModelUtil.findAllDescendentFilesets(removed);
for( int i = 0; i < filesets.length; i++ ) {
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java 2007-10-25 18:32:27 UTC (rev 4522)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java 2007-10-25 22:04:40 UTC (rev 4523)
@@ -243,10 +243,12 @@
return;
}
root = new ArchiveModelNode(project, packages, this);
+ ArchiveModelNode oldRoot = (ArchiveModelNode)archivesRoot.get(project);
xbPackages.put(project, packages);
archivesRoot.put(project, root);
createPackageNodeImpl(project, packages, null);
root.clearDeltas();
+ fireRegisterProjectEvent(oldRoot, root);
monitor.worked(1);
} catch (FileNotFoundException e) {
Trace.trace(getClass(), e);
@@ -259,6 +261,23 @@
}
}
+ protected void fireRegisterProjectEvent(final ArchiveModelNode oldRoot, final ArchiveModelNode newRoot) {
+ IArchiveNodeDelta delta = new IArchiveNodeDelta() {
+ public IArchiveNodeDelta[] getAddedChildrenDeltas() {return null;}
+ public IArchiveNodeDelta[] getAllAffectedChildren() {return null;}
+ public INodeDelta getAttributeDelta(String key) {return null;}
+ public String[] getAttributesWithDeltas() {return null;}
+ public IArchiveNodeDelta[] getChangedDescendentDeltas() {return null;}
+ public int getKind() {return IArchiveNodeDelta.UNKNOWN_CHANGE;}
+ public IArchiveNode getPostNode() {return newRoot;}
+ public IArchiveNode getPreNode() { return oldRoot; }
+ public String[] getPropertiesWithDeltas() {return null;}
+ public INodeDelta getPropertyDelta(String key) {return null;}
+ public IArchiveNodeDelta[] getRemovedChildrenDeltas() {return null;}
+ };
+ EventManager.fireDelta(delta);
+ }
+
public ArchiveNodeImpl createPackageNodeImpl (IPath project, XbPackageNode node, IArchiveNode parent) {
if( node instanceof XbPackages ) {
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveNodeDelta.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveNodeDelta.java 2007-10-25 18:32:27 UTC (rev 4522)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveNodeDelta.java 2007-10-25 22:04:40 UTC (rev 4523)
@@ -86,6 +86,11 @@
public static final int DESCENDENT_CHANGED = 0x400;
/**
+ * An unknown change has occurred. Best to reshow the entire module
+ */
+ public static final int UNKNOWN_CHANGE = 0x800;
+
+ /**
* Return the delta kind
* @return
*/
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java 2007-10-25 18:32:27 UTC (rev 4522)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java 2007-10-25 22:04:40 UTC (rev 4523)
@@ -26,7 +26,6 @@
import java.util.HashMap;
import java.util.Iterator;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveModelListenerManager;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNodeDelta;
17 years, 2 months
JBoss Tools SVN: r4522 - trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/model.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-25 14:32:27 -0400 (Thu, 25 Oct 2007)
New Revision: 4522
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/model/PaletteModel.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1179 NPE in palette
The waiting for the model is loaded is added to the Palette Model initialization
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/model/PaletteModel.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/model/PaletteModel.java 2007-10-25 17:44:49 UTC (rev 4521)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/model/PaletteModel.java 2007-10-25 18:32:27 UTC (rev 4522)
@@ -24,8 +24,14 @@
import org.jboss.tools.common.model.ui.views.palette.PaletteContents;
import org.jboss.tools.common.model.ui.views.palette.editor.PaletteEditor;
import org.jboss.tools.common.model.ui.util.ModelUtilities;
+import org.jboss.tools.common.model.util.ClassLoaderUtil;
public class PaletteModel {
+
+ static {
+ ClassLoaderUtil.init();
+ }
+
private static PaletteModel instance = null;
private static Object monitor = new Object();
17 years, 2 months
JBoss Tools SVN: r4521 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-25 13:44:49 -0400 (Thu, 25 Oct 2007)
New Revision: 4521
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
Log:
JBIDE-1171 (regression) run eclipse formatter on generated code
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java 2007-10-25 17:24:49 UTC (rev 4520)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java 2007-10-25 17:44:49 UTC (rev 4521)
@@ -17,6 +17,7 @@
import org.hibernate.console.HibernateConsoleRuntimeException;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
import org.hibernate.eclipse.launch.PathHelper;
+import org.hibernate.tool.hbm2x.ArtifactCollector;
import org.hibernate.tool.hbm2x.Exporter;
import org.hibernate.tool.hbm2x.GenericExporter;
import org.hibernate.util.StringHelper;
@@ -160,18 +161,21 @@
/**
* Creates exporter with the specified settings; also resolves any relevant properties via Eclipse VariablesPlugin.
+ * @param collector
* @throws CoreException in case of resolve variables issues.
*/
public Exporter createConfiguredExporter(Configuration cfg, String defaultOutputDirectory,
- String customTemplatePath, Properties globalProperties, Set outputDirectories) throws CoreException {
+ String customTemplatePath, Properties globalProperties, Set outputDirectories, ArtifactCollector collector) throws CoreException {
Exporter exporter = getExporterDefinition().createExporterInstance();
+
Properties props = new Properties();
props.putAll(globalProperties);
props.putAll(getProperties());
exporter.setProperties(props);
+ exporter.setArtifactCollector(collector);
exporter.setOutputDirectory(new File(defaultOutputDirectory));
if(props.containsKey("outputdir")) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2007-10-25 17:24:49 UTC (rev 4520)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2007-10-25 17:44:49 UTC (rev 4521)
@@ -38,7 +38,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -56,7 +55,7 @@
import org.eclipse.jdt.core.formatter.CodeFormatter;
import org.eclipse.jface.text.DocumentRewriteSessionType;
import org.eclipse.jface.text.IDocument;
-
+import org.eclipse.jface.util.Assert;
import org.eclipse.text.edits.TextEdit;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.JDBCMetaDataConfiguration;
@@ -70,7 +69,6 @@
import org.hibernate.console.execution.ExecutionContext.Command;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.model.impl.ExporterFactory;
-import org.hibernate.tool.hbm2x.AbstractExporter;
import org.hibernate.tool.hbm2x.ArtifactCollector;
import org.hibernate.tool.hbm2x.Exporter;
import org.hibernate.util.ReflectHelper;
@@ -139,6 +137,8 @@
formatGeneratedCode( monitor, collector );
}
+
+
Iterator iterator = outputDirectories.iterator();
while (iterator.hasNext()) {
String path = (String) iterator.next();
@@ -158,10 +158,11 @@
}
private void formatGeneratedCode(IProgressMonitor monitor, ArtifactCollector collector) {
- final TextFileBufferOperation operation = new FormatGeneratedCode( "java-artifact-format" );
+ final TextFileBufferOperation operation = new FormatGeneratedCode( "Formate generated code" );
File[] javaFiles = collector.getFiles("java");
if(javaFiles.length>0) {
+
IPath[] locations = new IPath[javaFiles.length];
for (int i = 0; i < javaFiles.length; i++) {
@@ -182,6 +183,7 @@
HibernateConsolePlugin.getDefault().logErrorMessage("exception during java format", e);
}
}
+
}
private void refreshOutputDir(String outputdir) {
@@ -222,9 +224,9 @@
return null;
return (ArtifactCollector) cc.execute(new Command() {
- private ArtifactCollector artifactCollector = new ArtifactCollector();
public Object execute() {
+ ArtifactCollector artifactCollector = new ArtifactCollector();
String templatePaths = null;
@@ -246,7 +248,7 @@
Exporter exporter;
try {
- exporter = exporterFactories[i].createConfiguredExporter(cfg, outputPathRes, templatePaths, globalProperties, outputDirectories);
+ exporter = exporterFactories[i].createConfiguredExporter(cfg, outputPathRes, templatePaths, globalProperties, outputDirectories, artifactCollector);
} catch (CoreException e) {
throw new HibernateConsoleRuntimeException("Error while setting up " + exporterFactories[i].getExporterDefinition(), e);
}
@@ -254,12 +256,9 @@
exporter.start();
monitor.worked(1);
}
- return getArtififactCollector();
+ return artifactCollector;
}
- private ArtifactCollector getArtififactCollector() {
- return artifactCollector ;
- }
});
17 years, 2 months
JBoss Tools SVN: r4520 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-10-25 13:24:49 -0400 (Thu, 25 Oct 2007)
New Revision: 4520
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1143 Fix panelGrid template
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2007-10-25 17:06:37 UTC (rev 4519)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2007-10-25 17:24:49 UTC (rev 4520)
@@ -312,7 +312,7 @@
nsIDOMElement visualHead = null;
nsIDOMElement visualFoot = null;
- nsIDOMElement visualBody = visualDocument.createElement(HTML.TAG_BODY);
+ nsIDOMElement visualBody = visualDocument.createElement(HTML.TAG_TBODY);
visualTable.appendChild(visualBody);
if (header != null || footer != null) {
if (header != null) {
17 years, 2 months
JBoss Tools SVN: r4519 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-25 13:06:37 -0400 (Thu, 25 Oct 2007)
New Revision: 4519
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/messages.properties
Log:
JBIDE-727
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerFieldEditor.java 2007-10-25 16:49:19 UTC (rev 4518)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerFieldEditor.java 2007-10-25 17:06:37 UTC (rev 4519)
@@ -170,7 +170,7 @@
label = new Label(composite, SWT.NONE);
label.setText(EditorMessages.getString("JavaChoicerFieldEditor.Tab1.Text.Label"));
- text = new Text(composite,SWT.SINGLE | SWT.BORDER);
+ text = new Text(composite,SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
gd = new GridData(GridData.FILL_HORIZONTAL);
text.setLayoutData(gd);
text.setText(valueProvider.getStringValue(true));
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/messages.properties 2007-10-25 16:49:19 UTC (rev 4518)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/messages.properties 2007-10-25 17:06:37 UTC (rev 4519)
@@ -4,7 +4,7 @@
TabbedJavaChoicerFieldEditor.Tab3.Label = Recent
JavaChoicerFieldEditor.Tab1.Tree.Label = Select a type\:
-JavaChoicerFieldEditor.Tab1.Text.Label = Choose a type\:
+JavaChoicerFieldEditor.Tab1.Text.Label = Selected type\:
JavaEclipseChoicerFieldEditor.ChooseType.Label = Choose a type\:
JavaEclipseChoicerFieldEditor.ClassesList.Label = Matching types\:
17 years, 2 months
JBoss Tools SVN: r4518 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-10-25 12:49:19 -0400 (Thu, 25 Oct 2007)
New Revision: 4518
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineContainerTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1143
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineContainerTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineContainerTemplate.java 2007-10-25 16:11:26 UTC (rev 4517)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineContainerTemplate.java 2007-10-25 16:49:19 UTC (rev 4518)
@@ -31,6 +31,7 @@
import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
public abstract class VpeDefineContainerTemplate extends VpeAbstractTemplate {
private static final String ATTR_TEMPLATE = "template";
@@ -77,8 +78,8 @@
}
defineContainer.remove(sourceNode);
}
-
- public void beforeRemove(VpePageContext pageContext, Node sourceNode, Node visualNode, Object data) {
+ @Override
+ public void beforeRemove(VpePageContext pageContext, Node sourceNode, nsIDOMNode visualNode, Object data) {
TemplateFileInfo templateFileInfo = (TemplateFileInfo)data;
if (templateFileInfo != null && templateFileInfo.templateFile != null) {
pageContext.getEditPart().getController().getIncludeList().removeIncludeModel(templateFileInfo.templateFile);
17 years, 2 months
JBoss Tools SVN: r4517 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-25 12:11:26 -0400 (Thu, 25 Oct 2007)
New Revision: 4517
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/SelectionNotifier.java
Log:
JBIDE-1184
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/SelectionNotifier.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/SelectionNotifier.java 2007-10-25 16:06:10 UTC (rev 4516)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/SelectionNotifier.java 2007-10-25 16:11:26 UTC (rev 4517)
@@ -12,12 +12,13 @@
import java.util.ArrayList;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-public class SelectionNotifier implements ISelectionProvider, ISelectionChangedListener {
+public class SelectionNotifier implements ISelectionProvider, ISelectionChangedListener, IPostSelectionProvider {
private ArrayList<ISelectionChangedListener> listeners = new ArrayList<ISelectionChangedListener>(3);
private ArrayList<ISelectionChangedListener> fires = new ArrayList<ISelectionChangedListener>(3);
private SelectionChangedEvent event;
@@ -62,4 +63,14 @@
for (int i=0;i<fires.size();++i) ((ISelectionChangedListener)fires.get(i)).selectionChanged(event);
fires.clear();
}
+
+ public void addPostSelectionChangedListener(
+ ISelectionChangedListener listener) {
+ // do nothing - workaround for dali
+ }
+
+ public void removePostSelectionChangedListener(
+ ISelectionChangedListener listener) {
+ // do nothing - workaround for dali
+ }
}
17 years, 2 months