JBoss Tools SVN: r2087 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: publishers and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-31 19:59:38 -0400 (Thu, 31 May 2007)
New Revision: 2087
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/PackageModuleFactory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
Log:
changes to the resource list to read directly from the file system
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/PackageModuleFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/PackageModuleFactory.java 2007-05-31 23:58:41 UTC (rev 2086)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/PackageModuleFactory.java 2007-05-31 23:59:38 UTC (rev 2087)
@@ -21,6 +21,7 @@
*/
package org.jboss.ide.eclipse.as.core.packages;
+import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
@@ -39,6 +40,7 @@
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.internal.ModuleFactory;
import org.eclipse.wst.server.core.internal.ModuleFile;
+import org.eclipse.wst.server.core.internal.ModuleFolder;
import org.eclipse.wst.server.core.internal.ServerPlugin;
import org.eclipse.wst.server.core.model.IModuleResource;
import org.eclipse.wst.server.core.model.ModuleDelegate;
@@ -138,10 +140,10 @@
if( propVal == null && create ) {
if( nextArchiveId == -1 ) {
nextArchiveId =
- new InstanceScope().getNode(JBossServerCorePlugin.PLUGIN_ID).getInt(MODULE_ID_PROPERTY_KEY, 0);
+ new InstanceScope().getNode(JBossServerCorePlugin.PLUGIN_ID).getInt(NEXT_ARCHIVE_KEY, 0);
}
nextArchiveId++;
- new InstanceScope().getNode(JBossServerCorePlugin.PLUGIN_ID).putInt(MODULE_ID_PROPERTY_KEY, nextArchiveId);
+ new InstanceScope().getNode(JBossServerCorePlugin.PLUGIN_ID).putInt(NEXT_ARCHIVE_KEY, nextArchiveId);
return MODULE_ID_PROPERTY_KEY + "." + nextArchiveId;
} else if( propVal == null ) {
return null;
@@ -201,25 +203,54 @@
public class PackagedModuleDelegate extends ModuleDelegate {
private IArchive pack;
private HashMap members;
+ private IPath root;
public PackagedModuleDelegate(IArchive pack) {
this.pack = pack;
- members = new HashMap();
}
- public IArchive getPackage() {return pack;}
+ public IArchive getPackage() {
+ return pack;
+ }
public IModule[] getChildModules() {
return new IModule[0];
}
public void reset() {
- members = new HashMap();
+ members = null;
}
+ protected void init() {
+ if( members == null ) {
+ members = new HashMap();
+ root = pack.getArchiveFilePath();
+ addResource(root.toFile());
+ }
+ }
+ protected void addResource(File f) {
+ if( f.isDirectory() ) {
+ IPath relative = getRelativePath(f);
+ members.put(relative, new ModuleFolder(f.getName(), relative));
+ File[] kids = f.listFiles();
+ for( int i = 0; i < kids.length; i++ ) {
+ addResource(kids[i]);
+ }
+ } else if( f.isFile() ) {
+ members.put(root, new ModuleFile(f.getName(), new Path(f.getName()), f.lastModified()));
+ }
+ }
+ protected IPath getRelativePath(File f) {
+ IPath tmp = new Path(f.getAbsolutePath());
+ return tmp.removeFirstSegments(root.segmentCount()-1);
+ }
+
public IModuleResource[] members() throws CoreException {
+ reset();
+ init();
Collection c = members.values();
return (IModuleResource[]) c.toArray(new IModuleResource[c.size()]);
}
public void fileUpdated(IPath filePath) {
+ init();
long timestamp;
timestamp = new Date().getTime(); // now
@@ -230,6 +261,7 @@
members.put(filePath, new ModuleFile(filePath.lastSegment(), filePath, timestamp));
}
public void fileRemoved(IPath filePath) {
+ init();
IPath dest = pack.getDestinationPath();
if( dest.isPrefixOf(filePath)) {
filePath = filePath.removeFirstSegments(dest.segmentCount());
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-05-31 23:58:41 UTC (rev 2086)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-05-31 23:59:38 UTC (rev 2087)
@@ -39,6 +39,7 @@
import org.eclipse.wst.server.core.internal.ModuleFile;
import org.eclipse.wst.server.core.model.IModuleResource;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.jboss.ide.eclipse.archives.core.build.ArchiveBuildDelegate;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
17 years, 7 months
JBoss Tools SVN: r2086 - trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-31 19:58:41 -0400 (Thu, 31 May 2007)
New Revision: 2086
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/FilesetWizard.java
Log:
bug where inworkspace wasn't being set
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/FilesetWizard.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/FilesetWizard.java 2007-05-31 23:58:03 UTC (rev 2085)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/FilesetWizard.java 2007-05-31 23:58:41 UTC (rev 2086)
@@ -60,6 +60,7 @@
if( page1.isRootDirWorkspaceRelative()) {
int workspaceLength = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString().length();
fileset.setSourcePath(new Path(page1.getRootDir().substring(workspaceLength)));
+ fileset.setInWorkspace(true);
} else {
fileset.setSourcePath(new Path(page1.getRootDir()));
fileset.setInWorkspace(false);
17 years, 7 months
JBoss Tools SVN: r2085 - in trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core: model/internal and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-31 19:58:03 -0400 (Thu, 31 May 2007)
New Revision: 2085
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
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/util/ModelUtil.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
Log:
fixing bugs, empty folders were being left
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2007-05-31 17:42:15 UTC (rev 2084)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2007-05-31 23:58:03 UTC (rev 2085)
@@ -130,8 +130,8 @@
/**
* Incremental build.
* Parameters are instance sof changed IPath objects
- * Will search only the given node for descendent filesets
- * @param archive An archive to limit the scope to, or null if the entire model
+ * Will search only the given node for matching descendent filesets
+ * @param archive An archive to limit the scope to, or null if the entire default model
* @param addedChanged A list of added or changed resource paths
* @param removed A list of removed resource paths
*/
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-05-31 17:42:15 UTC (rev 2084)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java 2007-05-31 23:58:03 UTC (rev 2085)
@@ -109,7 +109,7 @@
* @see IArchiveFileSet#getSourcePath()
*/
public IPath getSourcePath() {
- return new Path(filesetDelegate.getDir());
+ return filesetDelegate.getDir() == null ? null : new Path(filesetDelegate.getDir());
}
/*
@@ -179,7 +179,7 @@
*/
public void setSourcePath (IPath path) {
Assert.isNotNull(path);
- IPath src = getGlobalSourcePath();
+ IPath src = getSourcePath();
attributeChanged(SOURCE_PATH_ATTRIBUTE, src == null ? null : src.toString(), path == null ? null : path.toString());
filesetDelegate.setDir(path.toString());
rescanRequired = true;
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/ModelUtil.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/ModelUtil.java 2007-05-31 17:42:15 UTC (rev 2084)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/ModelUtil.java 2007-05-31 23:58:03 UTC (rev 2085)
@@ -159,6 +159,7 @@
* @return
*/
public static IPath getBaseFile(IArchiveNode node, IPath absolutePath) {
+ IArchiveNode parameterNode = node;
ArrayList list = new ArrayList();
while( node != null && !(node instanceof ArchiveModelNode)) {
list.add(node);
@@ -182,10 +183,11 @@
}
}
- if( absolutePath != null && node.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FILESET ) {
- IArchiveFileSet fs = ((IArchiveFileSet)node);
- if( fs.getSourcePath().isPrefixOf(absolutePath)) {
- lastConcrete.append(absolutePath.removeFirstSegments(fs.getSourcePath().segmentCount()));
+ if( absolutePath != null && parameterNode.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FILESET ) {
+ IArchiveFileSet fs = ((IArchiveFileSet)parameterNode);
+ IPath sourcePath = fs.isInWorkspace() ? workspacePathToAbsolutePath(fs.getSourcePath()) : fs.getSourcePath();
+ if( sourcePath.isPrefixOf(absolutePath)) {
+ lastConcrete = lastConcrete.append(absolutePath.removeFirstSegments(sourcePath.segmentCount()));
}
}
return lastConcrete;
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java 2007-05-31 17:42:15 UTC (rev 2084)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java 2007-05-31 23:58:03 UTC (rev 2085)
@@ -29,6 +29,7 @@
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.IArchiveNode;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveNodeVisitor;
import org.jboss.ide.eclipse.archives.core.util.ModelUtil;
import de.schlichtherle.io.ArchiveDetector;
@@ -56,12 +57,11 @@
}
public static void cleanFolder(IArchiveFolder folder) {
- cleanFolder(folder, true);
+ cleanFolder(getFile(folder), true);
}
- public static void cleanFolder(IArchiveFolder folder, boolean sync) {
- final File file = getFile(folder);
- TrueZipUtil.deleteEmptyFolders(file);
+ public static void cleanFolder(java.io.File folder, boolean sync) {
+ TrueZipUtil.deleteEmptyChildren(folder);
if( sync )
TrueZipUtil.sync();
}
@@ -87,7 +87,7 @@
// Let them know which files were removed, for events
public static IPath[] fullFilesetRemove(final IArchiveFileSet fileset, boolean sync) {
IPath[] paths = fileset.findMatchingPaths();
- ArrayList list = new ArrayList();
+ final ArrayList list = new ArrayList();
list.addAll(Arrays.asList(paths));
for( int i = 0; i < paths.length; i++ ) {
if( !ModelUtil.otherFilesetMatchesPath(fileset, paths[i])) {
@@ -97,7 +97,22 @@
list.remove(paths[i]);
}
}
-
+
+ // kinda ugly here. delete all empty folders beneath
+ cleanFolder(getFile(fileset), false);
+
+ // now ensure all mandatory child folders are still there
+ fileset.getParent().accept(new IArchiveNodeVisitor() {
+ public boolean visit(IArchiveNode node) {
+ if( node.getNodeType() == IArchiveNode.TYPE_ARCHIVE) {
+ createFile(node);
+ } else if( node.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FOLDER) {
+ createFile(node);
+ }
+ return true;
+ }
+ } );
+
if( sync )
TrueZipUtil.sync();
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2007-05-31 17:42:15 UTC (rev 2084)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2007-05-31 23:58:03 UTC (rev 2085)
@@ -109,6 +109,13 @@
file.deleteAll();
}
+ public static void deleteEmptyChildren(java.io.File file) {
+ if( file.isDirectory() ) {
+ java.io.File[] children = file.listFiles();
+ for( int i = 0; i < children.length; i++ )
+ deleteEmptyFolders(children[i]);
+ }
+ }
public static void deleteEmptyFolders(java.io.File file ) {
if( file.isDirectory() ) {
java.io.File[] children = file.listFiles();
17 years, 7 months
JBoss Tools SVN: r2084 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-31 13:42:15 -0400 (Thu, 31 May 2007)
New Revision: 2084
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
Log:
added maximum widths to the two areas i control. Not sure if it fixes the issue. (EXIN-478)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-05-31 17:33:11 UTC (rev 2083)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-05-31 17:42:15 UTC (rev 2084)
@@ -103,7 +103,7 @@
{
this.handle = handle;
- Composite main = new Composite(parent, SWT.BORDER);
+ Composite main = new Composite(parent, SWT.NONE);
main.setLayout(new FormLayout());
updateJREs();
@@ -246,7 +246,7 @@
// create internal widgets
- nameLabel = new Label(nameComposite, SWT.None);
+ nameLabel = new Label(nameComposite, SWT.NONE);
nameLabel.setText(Messages.wizardFragmentNameLabel);
nameText = new Text(nameComposite, SWT.BORDER);
@@ -566,7 +566,7 @@
}
private void createConfigurationComposite(Composite main) {
- configComposite = new Composite(main, SWT.BORDER);
+ configComposite = new Composite(main, SWT.NONE);
FormData cData = new FormData();
cData.left = new FormAttachment(0,5);
17 years, 7 months
JBoss Tools SVN: r2083 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-31 13:33:11 -0400 (Thu, 31 May 2007)
New Revision: 2083
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
Log:
added maximum widths to the two areas i control. Not sure if it fixes the issue. (EXIN-478)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-05-31 17:06:06 UTC (rev 2082)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-05-31 17:33:11 UTC (rev 2083)
@@ -103,7 +103,7 @@
{
this.handle = handle;
- Composite main = new Composite(parent, SWT.NONE);
+ Composite main = new Composite(parent, SWT.BORDER);
main.setLayout(new FormLayout());
updateJREs();
@@ -566,12 +566,13 @@
}
private void createConfigurationComposite(Composite main) {
- configComposite = new Composite(main, SWT.NONE);
+ configComposite = new Composite(main, SWT.BORDER);
FormData cData = new FormData();
cData.left = new FormAttachment(0,5);
cData.right = new FormAttachment(100,-5);
cData.top = new FormAttachment(jreComposite, 10);
+ cData.bottom = new FormAttachment(100, -5);
configComposite.setLayoutData(cData);
configComposite.setLayout(new FormLayout());
@@ -591,6 +592,8 @@
viewerData.left = new FormAttachment(0, 5);
viewerData.right = new FormAttachment(100, -5);
viewerData.top = new FormAttachment(configLabel, 5);
+ viewerData.bottom = new FormAttachment(100, -5);
+
configurations.getTable().setLayoutData(viewerData);
configurations.getTable().addSelectionListener(new SelectionListener() {
17 years, 7 months
JBoss Tools SVN: r2082 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-31 13:06:06 -0400 (Thu, 31 May 2007)
New Revision: 2082
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
Log:
JBIDE-477 (default directory) and EXIN-172 (4.2 icon)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-05-31 17:04:33 UTC (rev 2081)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-05-31 17:06:06 UTC (rev 2082)
@@ -165,7 +165,9 @@
private void setWidgetDefaults() {
nameText.setText(generateNewRuntimeName());
- homeDirText.setText( Platform.getOS() == Platform.WS_WIN32 ?
+ System.out.println("platform os = " + Platform.getOS());
+ System.out.println("win32 value: " + Platform.WS_WIN32);
+ homeDirText.setText( Platform.getOS().equals( Platform.WS_WIN32 ) ?
"c:/program files/jboss-" + getRuntimeVersionId() + ".x" :
"/usr/bin/jboss-" + getRuntimeVersionId() + ".x");
}
17 years, 7 months
JBoss Tools SVN: r2081 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-31 13:04:33 -0400 (Thu, 31 May 2007)
New Revision: 2081
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss42RuntimeWizardFragment.java
Log:
JBIDE-477 (default directory) and EXIN-172 (4.2 icon)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java 2007-05-31 05:01:45 UTC (rev 2080)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java 2007-05-31 17:04:33 UTC (rev 2081)
@@ -41,6 +41,7 @@
public static final String WIZBAN_JBOSS32_LOGO = "jboss32logo";
public static final String WIZBAN_JBOSS40_LOGO = "jboss40logo";
+ public static final String WIZBAN_JBOSS42_LOGO = "jboss42logo";
public static final String TWIDDLE_IMAGE = "TWIDDLE_IMAGE";
public static final String INACTIVE_CATEGORY_IMAGE = "INACTIVE_CATEGORY_IMAGE";
@@ -65,7 +66,8 @@
descriptors.put(WIZBAN_JBOSS32_LOGO, createImageDescriptor(pluginBundle, "/icons/logo32.gif"));
descriptors.put(WIZBAN_JBOSS40_LOGO, createImageDescriptor(pluginBundle, "/icons/logo40.gif"));
-
+ descriptors.put(WIZBAN_JBOSS42_LOGO, createImageDescriptor(pluginBundle, "/icons/logo42.gif"));
+
descriptors.put(TWIDDLE_IMAGE, createImageDescriptor(pluginBundle, "icons/twiddle.gif"));
descriptors.put(INACTIVE_CATEGORY_IMAGE, createImageDescriptor(pluginBundle, "/icons/inactiveCat.gif"));
descriptors.put(PUBLISH_IMAGE, createImageDescriptor(pluginBundle, "/icons/publish.gif"));
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-05-31 05:01:45 UTC (rev 2080)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-05-31 17:04:33 UTC (rev 2081)
@@ -28,6 +28,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.IVMInstallType;
import org.eclipse.jdt.launching.JavaRuntime;
@@ -164,7 +165,9 @@
private void setWidgetDefaults() {
nameText.setText(generateNewRuntimeName());
- homeDirText.setText("c:/program files/jboss-" + getRuntimeVersionId() + ".x");
+ homeDirText.setText( Platform.getOS() == Platform.WS_WIN32 ?
+ "c:/program files/jboss-" + getRuntimeVersionId() + ".x" :
+ "/usr/bin/jboss-" + getRuntimeVersionId() + ".x");
}
private String generateNewRuntimeName() {
String base = "JBoss-runtime";
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss42RuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss42RuntimeWizardFragment.java 2007-05-31 05:01:45 UTC (rev 2080)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss42RuntimeWizardFragment.java 2007-05-31 17:04:33 UTC (rev 2081)
@@ -7,7 +7,7 @@
AbstractJBossRuntimeWizardFragment {
protected ImageDescriptor getImageDescriptor() {
- return JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.WIZBAN_JBOSS40_LOGO);
+ return JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.WIZBAN_JBOSS42_LOGO);
}
}
17 years, 7 months
JBoss Tools SVN: r2080 - trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2007-05-31 01:01:45 -0400 (Thu, 31 May 2007)
New Revision: 2080
Modified:
trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/EJB3WizardsCorePlugin.java
Log:
rolled back/fixed
Modified: trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/EJB3WizardsCorePlugin.java
===================================================================
--- trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/EJB3WizardsCorePlugin.java 2007-05-30 18:21:53 UTC (rev 2079)
+++ trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/EJB3WizardsCorePlugin.java 2007-05-31 05:01:45 UTC (rev 2080)
@@ -38,7 +38,7 @@
//The shared instance.
private static EJB3WizardsCorePlugin plugin;
public static final String PLUGIN_ID = "org.jboss.ide.eclipse.ejb3.core";
-asdfasdf
+
//Resource bundle.
private ResourceBundle resourceBundle;
/**
17 years, 7 months
JBoss Tools SVN: r2079 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: publishers and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-30 14:21:53 -0400 (Wed, 30 May 2007)
New Revision: 2079
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
Log:
fixes much of the problems regarding incremental publish with wtp projects
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java 2007-05-30 17:49:36 UTC (rev 2078)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java 2007-05-30 18:21:53 UTC (rev 2079)
@@ -40,7 +40,7 @@
IProgressMonitor monitor) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".ear");
- topLevel.setDestinationPath(project.getLocation());
+ topLevel.setDestinationPath(new Path(project.getName()));
topLevel.setInWorkspace(true);
fillDefaultConfiguration(projectName, topLevel, monitor);
@@ -52,7 +52,7 @@
IProject project = module.getProject();
IContainer sourceContainer = project.getFolder(EARCONTENT);
IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".ear", sourceContainer);
- topLevel.setDestinationPath(project.getLocation());
+ topLevel.setDestinationPath(new Path(project.getName()));
topLevel.setInWorkspace(true);
fillDefaultConfiguration(project.getName(), topLevel, monitor);
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-05-30 17:49:36 UTC (rev 2078)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-05-30 18:21:53 UTC (rev 2079)
@@ -21,6 +21,13 @@
*/
package org.jboss.ide.eclipse.as.core.publishers;
+import java.io.File;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -29,6 +36,8 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.internal.ModuleFile;
+import org.eclipse.wst.server.core.model.IModuleResource;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.jboss.ide.eclipse.archives.core.build.ArchiveBuildDelegate;
@@ -52,6 +61,8 @@
*/
public class JstPublisher extends PackagesPublisher {
+ private static HashMap moduleToArchiveMap = new HashMap();
+
public static final int BUILD_FAILED_CODE = 100;
public static final int PACKAGE_UNDETERMINED_CODE = 101;
@@ -84,10 +95,21 @@
int deltaKind, int modulePublishState, IProgressMonitor monitor) throws CoreException {
PublishEvent event = PublisherEventLogger.createSingleModuleTopEvent(eventRoot, module, kind, deltaKind);
EventLogModel.markChanged(eventRoot);
- IArchive topLevel = createTopPackage(module, jbServer.getDeployDirectory(), monitor);
+ boolean incremental = shouldPublishIncremental(module, kind, deltaKind, modulePublishState);
+
+ IArchive topLevel = getTopPackage(module, jbServer.getDeployDirectory(), incremental, monitor);
+
+
if( topLevel != null ) {
try {
- new ArchiveBuildDelegate().fullArchiveBuild(topLevel);//, new NullProgressMonitor());
+ if( !incremental )
+ new ArchiveBuildDelegate().fullArchiveBuild(topLevel);
+ else {
+ Set addedChanged = createDefaultTreeSet();
+ Set removed = createDefaultTreeSet();
+ fillDelta(delta, addedChanged, removed);
+ new ArchiveBuildDelegate().incrementalBuild(topLevel, addedChanged, removed);
+ }
} catch( Exception e ) {
return new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, BUILD_FAILED_CODE, "", e);
}
@@ -100,19 +122,33 @@
protected IStatus unpublish(IDeployableServer jbServer, IModule module,
int kind, int deltaKind, int modulePublishKind, IProgressMonitor monitor) throws CoreException {
PublishEvent event = PublisherEventLogger.createSingleModuleTopEvent(eventRoot, module, kind, deltaKind);
- IArchive topLevel = createTopPackage(module, jbServer.getDeployDirectory(), monitor);
+
+ IArchive topLevel = getTopPackage(module, jbServer.getDeployDirectory(), false, monitor);
if( topLevel != null ) {
IPath path = topLevel.getArchiveFilePath();
FileUtil.safeDelete(path.toFile(), new PublisherFileUtilListener(event));
+ } else if( module.getProject() == null ){
+ // this is a problem. All I know is the module name, aka project name. Not it's suffix on the server.
} else {
return new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, PACKAGE_UNDETERMINED_CODE, "", null);
}
return new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID, IStatus.OK, "", null);
}
+
+ protected IArchive getTopPackage(IModule module, String deployDir,
+ boolean incremental, IProgressMonitor monitor) {
+ if( !moduleToArchiveMap.containsKey(module.getId()) || !incremental) {
+ IArchive top = createTopPackage(module, deployDir, monitor);
+ if( top != null )
+ moduleToArchiveMap.put(module.getId(), top);
+ }
+ return (IArchive)moduleToArchiveMap.get(module.getId());
+ }
+
protected IArchive createTopPackage(IModule module, String deployDir, IProgressMonitor monitor) {
IArchiveType type = ModulePackageTypeConverter.getPackageTypeFor(module);
- if( type != null ) {
+ if( type != null && module.getProject() != null ) {
IArchive topLevel = type.createDefaultConfiguration(module.getProject().getName(), monitor);
topLevel.setDestinationPath(new Path(deployDir));
topLevel.setInWorkspace(false);
@@ -120,4 +156,51 @@
}
return null;
}
+
+ protected void fillDelta(IModuleResourceDelta[] delta, Set addedChanged, Set removed) {
+ for( int i = 0; i < delta.length; i++ ) {
+ fillDelta(delta[i], addedChanged, removed);
+ }
+ }
+ protected void fillDelta(IModuleResourceDelta delta, Set addedChanged, Set removed) {
+ IModuleResourceDelta[] children = delta.getAffectedChildren();
+ if( children != null ) {
+ for( int i = 0; i < children.length; i++ ) {
+ fillDelta(children[i], addedChanged, removed);
+ }
+ }
+ handleResource(delta.getKind(), delta.getModuleResource(), addedChanged, removed);
+ }
+
+ protected void handleResource(int kind, IModuleResource resource, Set addedChanged, Set removed) {
+ if( resource instanceof ModuleFile ) {
+ ModuleFile mf = (ModuleFile)resource;
+ File f = (File)resource.getAdapter(java.io.File.class);
+ IPath p = null;
+ if( f == null ) {
+ IFile ifile = (IFile)resource.getAdapter(IFile.class);
+ if( ifile != null )
+ p = ifile.getLocation();
+ } else {
+ p = new Path(f.getAbsolutePath());
+ }
+
+ if( p != null ) {
+ if( kind == IModuleResourceDelta.ADDED || kind == IModuleResourceDelta.CHANGED) {
+ addedChanged.add(p);
+ } else if( kind == IModuleResourceDelta.REMOVED) {
+ removed.add(p);
+ }
+ }
+ }
+ }
+ protected TreeSet createDefaultTreeSet() {
+ return new TreeSet(new Comparator () {
+ public int compare(Object o1, Object o2) {
+ if (o1.equals(o2)) return 0;
+ else return -1;
+ }
+ });
+ }
+
}
17 years, 7 months
JBoss Tools SVN: r2078 - trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2007-05-30 13:49:36 -0400 (Wed, 30 May 2007)
New Revision: 2078
Modified:
trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/EJB3WizardsCorePlugin.java
Log:
forced bad code to test failure detection in the build system
Modified: trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/EJB3WizardsCorePlugin.java
===================================================================
--- trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/EJB3WizardsCorePlugin.java 2007-05-29 16:37:37 UTC (rev 2077)
+++ trunk/ejb3/plugins/org.jboss.ide.eclipse.ejb3.wizards.core/src/main/org/jboss/ide/eclipse/ejb3/core/EJB3WizardsCorePlugin.java 2007-05-30 17:49:36 UTC (rev 2078)
@@ -38,7 +38,7 @@
//The shared instance.
private static EJB3WizardsCorePlugin plugin;
public static final String PLUGIN_ID = "org.jboss.ide.eclipse.ejb3.core";
-
+asdfasdf
//Resource bundle.
private ResourceBundle resourceBundle;
/**
17 years, 7 months