JBoss Tools SVN: r8092 - in branches/jbosstools-2.1.x/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: 2008-05-15 00:28:17 -0400 (Thu, 15 May 2008)
New Revision: 8092
Modified:
branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ArchivesBuilder.java
branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java
Log:
JBIDE-2199 - avoid NPE's, log improper filesets
Modified: branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ArchivesBuilder.java
===================================================================
--- branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ArchivesBuilder.java 2008-05-15 04:27:17 UTC (rev 8091)
+++ branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ArchivesBuilder.java 2008-05-15 04:28:17 UTC (rev 8092)
@@ -157,9 +157,11 @@
if (node.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FILESET) {
IArchiveFileSet fileset = (IArchiveFileSet)node;
IPath p = fileset.getGlobalSourcePath();
- if( workspaceRoot.getLocation().isPrefixOf(p)) {
- IProject proj = workspaceRoot.getProject(p.segment(count));
- set.add(proj);
+ if( p != null ) {
+ if( workspaceRoot.getLocation().isPrefixOf(p)) {
+ IProject proj = workspaceRoot.getProject(p.segment(count));
+ set.add(proj);
+ }
}
}
return true;
Modified: branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java
===================================================================
--- branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java 2008-05-15 04:27:17 UTC (rev 8091)
+++ branches/jbosstools-2.1.x/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java 2008-05-15 04:28:17 UTC (rev 8092)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
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.IArchivesLogger;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension;
import org.jboss.ide.eclipse.archives.core.model.internal.xb.XbFileSet;
import org.jboss.ide.eclipse.archives.core.util.ModelUtil;
@@ -87,14 +88,22 @@
* @see IArchiveFileSet#getGlobalSourcePath()
*/
public IPath getGlobalSourcePath() {
+ IPath ret;
String path = getFileSetDelegate().getDir();
if (path == null || path.equals(".") || path.equals("")) {
- return getProjectPath();
+ ret = getProjectPath();
} else if( isInWorkspace()){
- return ModelUtil.workspacePathToAbsolutePath(new Path(path));
+ ret = ModelUtil.workspacePathToAbsolutePath(new Path(path));
} else {
- return new Path(path);
+ ret = new Path(path);
}
+
+ if( ret == null ) {
+ String message = "Error in fileset: " + toString() + "; No global source path found.";
+ ArchivesCore.getInstance().getLogger().log(IArchivesLogger.MSG_WARN, message, new Exception(message));
+ }
+
+ return ret;
}
/*
@@ -120,10 +129,13 @@
}
private boolean matchesPath(DirectoryScannerExtension scanner, IPath path) {
- if( getGlobalSourcePath().isPrefixOf(path)) {
- String s = path.toOSString().substring(getGlobalSourcePath().toOSString().length()+1);
- return scanner.isUltimatelyIncluded(s);
- }
+ IPath global = getGlobalSourcePath();
+ if( global != null ) {
+ if( global.isPrefixOf(path)) {
+ String s = path.toOSString().substring(getGlobalSourcePath().toOSString().length()+1);
+ return scanner.isUltimatelyIncluded(s);
+ }
+ }
return false;
}
@@ -262,5 +274,20 @@
public boolean validateModel() {
return getAllChildren().length == 0 ? true : false;
}
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append("{dir=");
+ sb.append(getFileSetDelegate().getDir());
+ sb.append(",includes=");
+ sb.append(getFileSetDelegate().getIncludes());
+ sb.append(",excludes=");
+ sb.append(getFileSetDelegate().getExcludes());
+ sb.append(",inWorkspace=");
+ sb.append(getFileSetDelegate().isInWorkspace());
+ sb.append(",flatten=");
+ sb.append(getFileSetDelegate().isFlattened());
+ return sb.toString();
+ }
}
17 years, 11 months
JBoss Tools SVN: r8091 - 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: 2008-05-15 00:27:17 -0400 (Thu, 15 May 2008)
New Revision: 8091
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ArchivesBuilder.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java
Log:
JBIDE-2199 - log improper filesets as errors and avoid NPE's
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ArchivesBuilder.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ArchivesBuilder.java 2008-05-15 01:54:53 UTC (rev 8090)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/project/ArchivesBuilder.java 2008-05-15 04:27:17 UTC (rev 8091)
@@ -157,9 +157,11 @@
if (node.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FILESET) {
IArchiveFileSet fileset = (IArchiveFileSet)node;
IPath p = fileset.getGlobalSourcePath();
- if( workspaceRoot.getLocation().isPrefixOf(p)) {
- IProject proj = workspaceRoot.getProject(p.segment(count));
- set.add(proj);
+ if( p != null ) {
+ if( workspaceRoot.getLocation().isPrefixOf(p)) {
+ IProject proj = workspaceRoot.getProject(p.segment(count));
+ set.add(proj);
+ }
}
}
return true;
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 2008-05-15 01:54:53 UTC (rev 8090)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java 2008-05-15 04:27:17 UTC (rev 8091)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
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.IArchivesLogger;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension;
import org.jboss.ide.eclipse.archives.core.model.internal.xb.XbFileSet;
import org.jboss.ide.eclipse.archives.core.util.ModelUtil;
@@ -87,14 +88,22 @@
* @see IArchiveFileSet#getGlobalSourcePath()
*/
public IPath getGlobalSourcePath() {
+ IPath ret;
String path = getFileSetDelegate().getDir();
if (path == null || path.equals(".") || path.equals("")) {
- return getProjectPath();
+ ret = getProjectPath();
} else if( isInWorkspace()){
- return ModelUtil.workspacePathToAbsolutePath(new Path(path));
+ ret = ModelUtil.workspacePathToAbsolutePath(new Path(path));
} else {
- return new Path(path);
+ ret = new Path(path);
}
+
+ if( ret == null ) {
+ String message = "Error in fileset: " + toString() + "; No global source path found.";
+ ArchivesCore.getInstance().getLogger().log(IArchivesLogger.MSG_WARN, message, new Exception(message));
+ }
+
+ return ret;
}
/*
@@ -120,10 +129,13 @@
}
private boolean matchesPath(DirectoryScannerExtension scanner, IPath path) {
- if( getGlobalSourcePath().isPrefixOf(path)) {
- String s = path.toOSString().substring(getGlobalSourcePath().toOSString().length()+1);
- return scanner.isUltimatelyIncluded(s);
- }
+ IPath global = getGlobalSourcePath();
+ if( global != null ) {
+ if( global.isPrefixOf(path)) {
+ String s = path.toOSString().substring(getGlobalSourcePath().toOSString().length()+1);
+ return scanner.isUltimatelyIncluded(s);
+ }
+ }
return false;
}
@@ -262,5 +274,20 @@
public boolean validateModel() {
return getAllChildren().length == 0 ? true : false;
}
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append("{dir=");
+ sb.append(getFileSetDelegate().getDir());
+ sb.append(",includes=");
+ sb.append(getFileSetDelegate().getIncludes());
+ sb.append(",excludes=");
+ sb.append(getFileSetDelegate().getExcludes());
+ sb.append(",inWorkspace=");
+ sb.append(getFileSetDelegate().isInWorkspace());
+ sb.append(",flatten=");
+ sb.append(getFileSetDelegate().isFlattened());
+ return sb.toString();
+ }
}
17 years, 11 months
JBoss Tools SVN: r8090 - branches/jbosstools-2.1.x/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: 2008-05-14 21:54:53 -0400 (Wed, 14 May 2008)
New Revision: 8090
Modified:
branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
JBIDE-1979
Modified: branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2008-05-15 01:54:05 UTC (rev 8089)
+++ branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2008-05-15 01:54:53 UTC (rev 8090)
@@ -72,6 +72,9 @@
public class JBossRuntimeWizardFragment extends WizardFragment {
private IWizardHandle handle;
+ private boolean beenEntered = false;
+
+
private Label nameLabel, homeDirLabel, installedJRELabel, configLabel,
explanationLabel;
private Text nameText, homeDirText;
@@ -518,6 +521,7 @@
// WST API methods
public void enter() {
+ beenEntered = true;
}
public void exit() {
@@ -544,7 +548,7 @@
}
public boolean isComplete() {
- return getErrorString() == null ? true : false;
+ return beenEntered && (getErrorString() == null ? true : false);
}
public boolean hasComposite() {
17 years, 11 months
JBoss Tools SVN: r8089 - 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: 2008-05-14 21:54:05 -0400 (Wed, 14 May 2008)
New Revision: 8089
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
JBIDE-1979
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2008-05-14 21:29:09 UTC (rev 8088)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2008-05-15 01:54:05 UTC (rev 8089)
@@ -72,6 +72,9 @@
public class JBossRuntimeWizardFragment extends WizardFragment {
private IWizardHandle handle;
+ private boolean beenEntered = false;
+
+
private Label nameLabel, homeDirLabel, installedJRELabel, configLabel,
explanationLabel;
private Text nameText, homeDirText;
@@ -518,6 +521,7 @@
// WST API methods
public void enter() {
+ beenEntered = true;
}
public void exit() {
@@ -544,7 +548,7 @@
}
public boolean isComplete() {
- return getErrorString() == null ? true : false;
+ return beenEntered && (getErrorString() == null ? true : false);
}
public boolean hasComposite() {
17 years, 11 months
JBoss Tools SVN: r8088 - in trunk/core/plugins/org.jboss.ide.eclipse.archives.core: schema and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-05-14 17:29:09 -0400 (Wed, 14 May 2008)
New Revision: 8088
Added:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/schema/actionTypes.exsd
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/model/types/AntActionType.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IActionType.java
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/schema/archiveTypes.exsd
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/model/other/internal/WorkspaceExtensionManager.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntExtensionManager.java
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/IArchiveAction.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IExtensionManager.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveActionImpl.java
Log:
JBIDE-476
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml 2008-05-14 19:27:11 UTC (rev 8087)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml 2008-05-14 21:29:09 UTC (rev 8088)
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
- <extension-point id="archiveTypes" name="JBossIDE Package Type" schema="schema/archiveTypes.exsd"/>
+ <extension-point id="archiveTypes" name="JBoss Tools Package Type" schema="schema/archiveTypes.exsd"/>
+ <extension-point id="actionTypes" name="JBoss Tools Build Action Type" schema="schema/actionTypes.exsd"/>
<extension
id="archivesNature"
name="JBossIDE Packages Nature"
@@ -43,5 +44,13 @@
content-type="org.eclipse.ant.core.antBuildFile">
</file-association>
</extension>
+ <extension
+ point="org.jboss.ide.eclipse.archives.core.actionTypes">
+ <actionType
+ class="org.jboss.ide.eclipse.archives.core.model.types.AntActionType"
+ id="org.jboss.ide.eclipse.archives.core.antActionType"
+ label="Ant Task">
+ </actionType>
+ </extension>
</plugin>
Added: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/schema/actionTypes.exsd
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/schema/actionTypes.exsd (rev 0)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/schema/actionTypes.exsd 2008-05-14 21:29:09 UTC (rev 8088)
@@ -0,0 +1,119 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.ide.eclipse.archives.core">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.jboss.ide.eclipse.archives.core" id="actionTypes" name="JBoss Tools Build Action Type"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="actionType" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="actionType">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="label" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.jboss.ide.eclipse.archives.core.model.IActionType"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/schema/archiveTypes.exsd
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/schema/archiveTypes.exsd 2008-05-14 19:27:11 UTC (rev 8087)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/schema/archiveTypes.exsd 2008-05-14 21:29:09 UTC (rev 8088)
@@ -1,119 +1,119 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.jboss.ide.eclipse.archives.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.jboss.ide.eclipse.archives.core" id="packageTypes" name="JBossIDE Package Type"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="packageType" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="packageType">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.jboss.ide.eclipse.archives.core.model.types.IPackageType"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.ide.eclipse.archives.core">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.jboss.ide.eclipse.archives.core" id="packageTypes" name="JBoss Tools Package Type"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="packageType" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="packageType">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="label" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.jboss.ide.eclipse.archives.core.model.IArchiveType"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/model/other/internal/WorkspaceExtensionManager.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/model/other/internal/WorkspaceExtensionManager.java 2008-05-14 19:27:11 UTC (rev 8087)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/model/other/internal/WorkspaceExtensionManager.java 2008-05-14 21:29:09 UTC (rev 8088)
@@ -33,6 +33,7 @@
import org.eclipse.core.runtime.InvalidRegistryObjectException;
import org.eclipse.core.runtime.Platform;
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
+import org.jboss.ide.eclipse.archives.core.model.IActionType;
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.archives.core.model.IExtensionManager;
@@ -44,6 +45,7 @@
*/
public class WorkspaceExtensionManager implements IExtensionManager {
public static final String ARCHIVE_TYPES_EXTENSION_ID = "org.jboss.ide.eclipse.archives.core.archiveTypes";
+ public static final String ACTION_TYPES_EXTENSION_ID = "org.jboss.ide.eclipse.archives.core.actionTypes";
private IExtension[] findExtension (String extensionId) {
IExtensionRegistry registry = Platform.getExtensionRegistry();
@@ -85,5 +87,40 @@
return (IArchiveType[]) c.toArray(new IArchiveType[c.size()]);
}
-
+
+ private static Hashtable actionTypes;
+ public IActionType getActionType(String id) {
+ if (actionTypes == null)
+ loadActionTypes();
+ return (IActionType)actionTypes.get(id);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.ide.eclipse.archives.core.model.IExtensionManager#getActionTypes()
+ */
+ public IActionType[] getActionTypes() {
+ if( actionTypes == null )
+ loadActionTypes();
+ Collection c = archiveTypes.values();
+ return (IActionType[]) c.toArray(new IActionType[c.size()]);
+ }
+
+ private void loadActionTypes() {
+ actionTypes = new Hashtable();
+ IExtension[] extensions = findExtension(ACTION_TYPES_EXTENSION_ID);
+ for (int i = 0; i < extensions.length; i++) {
+ IConfigurationElement elements[] = extensions[i].getConfigurationElements();
+ for (int j = 0; j < elements.length; j++) {
+ try {
+ Object executable = elements[j].createExecutableExtension("class");
+ IActionType type = (IActionType)executable;
+ actionTypes.put(type.getId(), type);
+ } catch (InvalidRegistryObjectException e) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.WARNING, e.getMessage(), e);
+ } catch( CoreException e ) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.WARNING, e.getMessage(), e);
+ }
+ }
+ }
+ }
}
Added: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/model/types/AntActionType.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/model/types/AntActionType.java (rev 0)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/model/types/AntActionType.java 2008-05-14 21:29:09 UTC (rev 8088)
@@ -0,0 +1,55 @@
+/**
+ * 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.model.types;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.jboss.ide.eclipse.archives.core.model.IActionType;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveAction;
+
+/**
+ * @author rob.stryker <rob.stryker(a)redhat.com>
+ *
+ */
+public class AntActionType implements IActionType, IExecutableExtension {
+
+ private IConfigurationElement element;
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
+ if( element == null ) element = config;
+ }
+ public String getId() {
+ return element.getAttribute("id");
+ }
+
+ public String getLabel() {
+ return element.getAttribute("label");
+ }
+
+ public void execute(IArchiveAction action) {
+ System.out.println("Ant Working!");
+ }
+
+ public String getStringRepresentation(IArchiveAction action) {
+ return "Ant action";
+ }
+}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntExtensionManager.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntExtensionManager.java 2008-05-14 19:27:11 UTC (rev 8087)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntExtensionManager.java 2008-05-14 21:29:09 UTC (rev 8088)
@@ -1,6 +1,7 @@
package org.jboss.ide.eclipse.archives.core.ant;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.ide.eclipse.archives.core.model.IActionType;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.archives.core.model.IExtensionManager;
@@ -24,11 +25,11 @@
return typeId;
}
public IArchive createDefaultConfiguration(String projectName, IProgressMonitor monitor) {
- // TODO Auto-generated method stub
+ // do nothing, should not be called from ant
return null;
}
public IArchive fillDefaultConfiguration(String projectName, IArchive topLevel, IProgressMonitor monitor) {
- // TODO Auto-generated method stub
+ // do nothing, should not be called from ant
return null;
}
};
@@ -38,4 +39,12 @@
return new IArchiveType[0];
}
+ public IActionType getActionType(String id) {
+ return null;
+ }
+
+ public IActionType[] getActionTypes() {
+ return new IActionType[0];
+ }
+
}
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 2008-05-14 19:27:11 UTC (rev 8087)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2008-05-14 21:29:09 UTC (rev 8088)
@@ -29,6 +29,7 @@
import org.jboss.ide.eclipse.archives.core.model.ArchivesModel;
import org.jboss.ide.eclipse.archives.core.model.EventManager;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveAction;
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.IArchiveModelRootNode;
@@ -82,6 +83,15 @@
if( !pkg.getGlobalDestinationPath().toFile().exists() ) {
pkg.getGlobalDestinationPath().toFile().mkdirs();
}
+
+ // Run the pre actions
+ IArchiveAction[] actions = pkg.getActions();
+ for( int i = 0; i < actions.length; i++ ) {
+ if( actions[i].getTime().equals(IArchiveAction.PRE_BUILD)) {
+ actions[i].execute();
+ }
+ }
+
ModelTruezipBridge.createFile(pkg);
// force create all folders
@@ -96,6 +106,13 @@
fullFilesetBuild(filesets[i], pkg);
}
+ // Run the post actions
+ for( int i = 0; i < actions.length; i++ ) {
+ if( actions[i].getTime().equals(IArchiveAction.POST_BUILD)) {
+ actions[i].execute();
+ }
+ }
+
EventManager.finishedBuildingArchive(pkg);
}
Added: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IActionType.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IActionType.java (rev 0)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IActionType.java 2008-05-14 21:29:09 UTC (rev 8088)
@@ -0,0 +1,50 @@
+/**
+ * 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.model;
+
+/**
+ * @author rob.stryker <rob.stryker(a)redhat.com>
+ *
+ */
+public interface IActionType {
+ /**
+ * Get the id for this action type
+ * @return
+ */
+ public String getId();
+
+ /**
+ * Get a label for this action type
+ * @return
+ */
+ public String getLabel();
+
+ /**
+ * Execute an action of your type
+ */
+ public void execute(IArchiveAction action);
+
+ /**
+ * Get a string representation for this action
+ */
+ public String getStringRepresentation(IArchiveAction action);
+}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveAction.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveAction.java 2008-05-14 19:27:11 UTC (rev 8087)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveAction.java 2008-05-14 21:29:09 UTC (rev 8088)
@@ -57,12 +57,22 @@
public void setTime(String time);
/**
+ * Get the id of this action's type.
+ * These are to be provided via an extension point
+ * or ant task to be discovered in ArchivesCore.
+ * @return
+ */
+ public String getTypeString();
+
+ /**
* Get the type of action this is.
* These are to be provided via an extension point
* or ant task to be discovered in ArchivesCore.
* @return
*/
- public String getType();
+ public IActionType getType();
+
+
/**
* Set the type of action this is.
@@ -71,4 +81,14 @@
* @return
*/
public void setType(String type);
+
+ /**
+ * Execute me
+ */
+ public void execute();
+
+ /**
+ * ToString must give something usable
+ */
+ public String toString();
}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IExtensionManager.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IExtensionManager.java 2008-05-14 19:27:11 UTC (rev 8087)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IExtensionManager.java 2008-05-14 21:29:09 UTC (rev 8088)
@@ -24,4 +24,6 @@
public interface IExtensionManager {
public IArchiveType[] getArchiveTypes();
public IArchiveType getArchiveType(String id);
+ public IActionType[] getActionTypes();
+ public IActionType getActionType(String id);
}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveActionImpl.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveActionImpl.java 2008-05-14 19:27:11 UTC (rev 8087)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveActionImpl.java 2008-05-14 21:29:09 UTC (rev 8088)
@@ -22,6 +22,8 @@
package org.jboss.ide.eclipse.archives.core.model.internal;
import org.eclipse.core.runtime.IPath;
+import org.jboss.ide.eclipse.archives.core.ArchivesCore;
+import org.jboss.ide.eclipse.archives.core.model.IActionType;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveAction;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
@@ -67,9 +69,17 @@
/* (non-Javadoc)
* @see org.jboss.ide.eclipse.archives.core.model.IArchiveAction#getType()
*/
- public String getType() {
+ public String getTypeString() {
return actionDelegate.getType();
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.ide.eclipse.archives.core.model.IArchiveAction#getType()
+ */
+ public IActionType getType() {
+ return ArchivesCore.getInstance().getExtensionManager().getActionType(getTypeString());
+ }
/* (non-Javadoc)
* @see org.jboss.ide.eclipse.archives.core.model.IArchiveAction#setTime(java.lang.String)
@@ -99,5 +109,16 @@
return false;
return true;
}
-
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.ide.eclipse.archives.core.model.IArchiveAction#execute()
+ */
+ public void execute() {
+ getType().execute(this);
+ }
+
+ public String toString() {
+ return getType().getStringRepresentation(this);
+ }
}
\ No newline at end of file
17 years, 11 months
JBoss Tools SVN: r8087 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper: model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-05-14 15:27:11 -0400 (Wed, 14 May 2008)
New Revision: 8087
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesBlock.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1610
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesBlock.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesBlock.java 2008-05-14 19:27:05 UTC (rev 8086)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TablePropertiesBlock.java 2008-05-14 19:27:11 UTC (rev 8087)
@@ -30,9 +30,11 @@
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
@@ -44,6 +46,7 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog;
import org.eclipse.ui.forms.DetailsPart;
import org.eclipse.ui.forms.IManagedForm;
@@ -102,18 +105,32 @@
GridData gd = new GridData( GridData.FILL_BOTH );
gd.heightHint = 20;
gd.widthHint = 100;
+ gd.verticalSpan = 2;
t.setLayoutData( gd );
toolkit.paintBordersFor( client );
- Button b = toolkit.createButton( client, "Add...", SWT.PUSH );
- b.addSelectionListener(new SelectionAdapter() {
+ Button btnAdd = toolkit.createButton( client, "Add...", SWT.PUSH );
+ btnAdd.addSelectionListener(new SelectionAdapter() {
+
public void widgetSelected(SelectionEvent e) {
doAdd();
}
});
gd = new GridData( GridData.VERTICAL_ALIGN_BEGINNING );
- b.setLayoutData( gd );
+ btnAdd.setLayoutData( gd );
+
+ Button btnDel = toolkit.createButton( client, "Delete", SWT.PUSH );
+ btnDel.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ doDelete();
+ }
+
+ });
+ gd = new GridData( GridData.VERTICAL_ALIGN_BEGINNING );
+ btnDel.setLayoutData( gd );
+
section.setClient( client );
final SectionPart spart = new SectionPart( section ) {
public boolean setFormInput(Object input) {
@@ -203,6 +220,34 @@
}
+ protected void doDelete() {
+ ISelection sel = viewer.getSelection();
+ if (sel.isEmpty() || !(sel instanceof TreeSelection)) {
+ return;
+ }
+ boolean updateSelection = false;
+ TreeSelection ts = (TreeSelection)sel;
+ List list = ts.toList();
+ for (Iterator it = list.iterator(); it.hasNext();) {
+ Object obj = it.next();
+ if (!(obj instanceof IRevEngTable)) {
+ continue;
+ }
+ IRevEngTable retable = (IRevEngTable)obj;
+ if (retable instanceof RevEngTableAdapter) {
+ updateSelection = true;
+ }
+ editor.getReverseEngineeringDefinition().removeTable(retable);
+ }
+ if (updateSelection) {
+ // if it possible select first item
+ TreeItem[] treeItems = viewer.getTree().getItems();
+ if (treeItems.length > 0) {
+ viewer.getTree().setSelection(treeItems[0]);
+ }
+ }
+ }
+
private CheckedTreeSelectionDialog createTreeSelectionDialog() {
return new CheckedTreeSelectionDialog(getComposite().getShell(), new AnyAdaptableLabelProvider(), new DeferredContentProvider()) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-05-14 19:27:05 UTC (rev 8086)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-05-14 19:27:11 UTC (rev 8087)
@@ -347,6 +347,23 @@
}
}
+ public void removeTable(IRevEngTable retable) {
+ if ( retable instanceof RevEngTableAdapter) {
+ RevEngTableAdapter tf = (RevEngTableAdapter) retable;
+ Node parentNode = tf.getNode().getParentNode();
+ Node previousSibling = tf.getNode().getPreviousSibling();
+ if(DOMModelUtil.isWhiteSpace(previousSibling)) {
+ parentNode.removeChild(previousSibling);
+ }
+ parentNode.removeChild(tf.getNode());
+ DOMModelUtil.formatNode(parentNode);
+ if(parentNode.getChildNodes().getLength()==0) {
+ Node parentNode2 = parentNode.getParentNode();
+ parentNode2.removeChild(parentNode);
+ }
+ }
+ }
+
public IRevEngColumn createColumn() {
return (IRevEngColumn) factory.adapt((INodeNotifier) getDocument().createElement("column"));
}
17 years, 11 months
JBoss Tools SVN: r8086 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model: impl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-05-14 15:27:05 -0400 (Wed, 14 May 2008)
New Revision: 8086
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1610
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java 2008-05-14 16:56:40 UTC (rev 8085)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/IReverseEngineeringDefinition.java 2008-05-14 19:27:05 UTC (rev 8086)
@@ -56,6 +56,7 @@
IRevEngTable[] getTables();
IRevEngTable createTable();
void addTable(IRevEngTable retable);
+ void removeTable(IRevEngTable retable);
IRevEngColumn createColumn();
IRevEngColumn createKeyColumn();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java 2008-05-14 16:56:40 UTC (rev 8085)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ReverseEngineeringDefinitionImpl.java 2008-05-14 19:27:05 UTC (rev 8086)
@@ -157,6 +157,10 @@
}
+ public void removeTable(IRevEngTable retable) {
+
+ }
+
public IRevEngColumn createColumn() {
return null;
}
17 years, 11 months
JBoss Tools SVN: r8085 - branches/jbosstools-2.1.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-05-14 12:56:40 -0400 (Wed, 14 May 2008)
New Revision: 8085
Modified:
branches/jbosstools-2.1.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TemplateManagingUtil.java
Log:
JBIDE-2205
Modified: branches/jbosstools-2.1.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TemplateManagingUtil.java
===================================================================
--- branches/jbosstools-2.1.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TemplateManagingUtil.java 2008-05-14 16:29:30 UTC (rev 8084)
+++ branches/jbosstools-2.1.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TemplateManagingUtil.java 2008-05-14 16:56:40 UTC (rev 8085)
@@ -84,7 +84,7 @@
* you will must review next code
*/
VpeNodeMapping nodeMapping = pageContext.getDomMapping()
- .getNearNodeMapping(getSelectedNode(getCurrentSelection(pageContext)));
+ .getNearNodeMapping(selectedNode);
if (nodeMapping != null) {
17 years, 11 months
JBoss Tools SVN: r8084 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-05-14 12:29:30 -0400 (Wed, 14 May 2008)
New Revision: 8084
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TemplateManagingUtil.java
Log:
JBIDE-2205
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TemplateManagingUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TemplateManagingUtil.java 2008-05-14 15:48:37 UTC (rev 8083)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TemplateManagingUtil.java 2008-05-14 16:29:30 UTC (rev 8084)
@@ -84,7 +84,7 @@
* you will must review next code
*/
VpeNodeMapping nodeMapping = pageContext.getDomMapping()
- .getNearNodeMapping(getSelectedNode(getCurrentSelection(pageContext)));
+ .getNearNodeMapping(selectedNode);
if (nodeMapping != null) {
17 years, 11 months
JBoss Tools SVN: r8083 - in trunk: documentation/guides/GettingStartedGuide/en/modules and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-05-14 11:48:37 -0400 (Wed, 14 May 2008)
New Revision: 8083
Modified:
trunk/as/docs/reference/en/modules/modules.xml
trunk/as/docs/reference/en/modules/quick_start.xml
trunk/as/docs/reference/en/modules/runtimes_servers.xml
trunk/as/docs/reference/en/modules/webtools.xml
trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml
trunk/jsf/docs/userguide/en/modules/palette.xml
trunk/jsf/docs/userguide/en/modules/spring_tools.xml
trunk/seam/docs/reference/en/modules/directory_structure.xml
trunk/seam/docs/reference/en/modules/intro.xml
trunk/seam/docs/reference/en/modules/seam_editors.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-320
comments are corrected to the corresponding docbook tags with attributes
Modified: trunk/as/docs/reference/en/modules/modules.xml
===================================================================
--- trunk/as/docs/reference/en/modules/modules.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/as/docs/reference/en/modules/modules.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -7,7 +7,7 @@
are several ways to do it provided by WTP, and some additional methods provided by JBoss
Tools. These methods are described further in this chapter.</para>
- <section> <!-- mark as updated -->
+ <section revisionflag="changed">
<title>Deploying on the Package Explorer</title>
<para>On the package explorer it is possible to publish either a project to a server or just
Modified: trunk/as/docs/reference/en/modules/quick_start.xml
===================================================================
--- trunk/as/docs/reference/en/modules/quick_start.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/as/docs/reference/en/modules/quick_start.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="quick_start"> <!-- mark as new -->
+<chapter id="quick_start" revisionflag="added">
<title>Quick Start with JBoss Server</title>
<para>This chapter covers the basics of working with the JBoss server. If you already have
Modified: trunk/as/docs/reference/en/modules/runtimes_servers.xml
===================================================================
--- trunk/as/docs/reference/en/modules/runtimes_servers.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/as/docs/reference/en/modules/runtimes_servers.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -184,7 +184,7 @@
arguments</link>. They are often backed by a runtime object representing that server's
location.</para>
- <section> <!-- mark as updated -->
+ <section revisionflag="changed">
<title>Creating a New Server</title>
<para>There are many ways to get to the new server wizard. One way is to use the old standard <emphasis>
Modified: trunk/as/docs/reference/en/modules/webtools.xml
===================================================================
--- trunk/as/docs/reference/en/modules/webtools.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/as/docs/reference/en/modules/webtools.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -30,7 +30,7 @@
</section>
- <section> <!-- mark as updated -->
+ <section revisionflag="changed">
<title>Adding Facets to a Project</title>
<para>There are two ways to add facets to a project. The first way is to include facets into
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="first_seam" xreflabel="first_seam"> <!-- mark as new -->
+<chapter id="first_seam" xreflabel="first_seam" revisionflag="added">
<?dbhtml filename="first_seam.html"?>
<chapterinfo>
<keywordset>
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -26,7 +26,7 @@
</note>
</section>
- <section id="map_file_wizard"> <!-- mark as new -->
+ <section id="map_file_wizard" revisionflag="added">
<title>Creating a Hibernate Mapping File</title>
<para>Hibernate mapping files are used to specify how your objects are related to database
@@ -1116,7 +1116,7 @@
</section>
</section>
- <section id="map_config_struct_editor"> <!-- mark as new -->
+ <section id="map_config_struct_editor" revisionflag="added">
<title>Structured Hibernate Mapping and Configuration File Editor</title>
<para>The structured editor represents the file in the tree form. It also allows to modify the
structure of the file and its elements with the help of tables provided on the right-hand
@@ -1447,7 +1447,7 @@
</section>
</section>
- <section> <!-- mark as updated -->
+ <section revisionflag="changed">
<title>Prototyping Queries</title>
<para>Queries can be prototyped by entering them in the <property>HQL</property> or
Modified: trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml
===================================================================
--- trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -42,7 +42,7 @@
</figure>
</section>
- <section> <!-- mark as new -->
+ <section revisionflag="added">
<title>Configuring Task Nodes</title>
<para>Here, we'll examine how you can configure the Task nodes in jBPM jPDL GPD.</para>
Modified: trunk/jsf/docs/userguide/en/modules/palette.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/palette.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/jsf/docs/userguide/en/modules/palette.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<chapter id="palette" xreflabel="palette"> <!-- mark as updated -->
+<chapter id="palette" xreflabel="palette" revisionflag="changed">
<?dbhtml filename="palette.html"?>
<chapterinfo>
<keywordset>
Modified: trunk/jsf/docs/userguide/en/modules/spring_tools.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/spring_tools.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/jsf/docs/userguide/en/modules/spring_tools.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="springTools"> <!-- mark as new -->
+<chapter id="springTools" revisionflag="added">
<?dbhtml filename="springTools.html"?>
<title>Spring Tools</title>
Modified: trunk/seam/docs/reference/en/modules/directory_structure.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/directory_structure.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/seam/docs/reference/en/modules/directory_structure.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="directory_str" xreflabel="directory_str"> <!-- mark as updated -->
+<chapter id="directory_str" xreflabel="directory_str" revisionflag="added">
<?dbhtml filename="directory_structure.html"?>
<chapterinfo>
<keywordset>
Modified: trunk/seam/docs/reference/en/modules/intro.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/intro.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/seam/docs/reference/en/modules/intro.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -25,7 +25,7 @@
applications with many component frameworks.</para>
</section>
- <section> <!-- mark as updated -->
+ <section revisionflag="added">
<title>Installation into Eclipse</title>
<para>Here, we are going to explain how to install Seam plugin into Eclipse.</para>
Modified: trunk/seam/docs/reference/en/modules/seam_editors.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/seam_editors.xml 2008-05-14 15:25:20 UTC (rev 8082)
+++ trunk/seam/docs/reference/en/modules/seam_editors.xml 2008-05-14 15:48:37 UTC (rev 8083)
@@ -88,7 +88,7 @@
on your project which will execute all the active WTP validations.</para>
</section>
- <section id="ComponentsEditor"> <!-- mark as updated -->
+ <section id="ComponentsEditor" revisionflag="changed">
<title>Structured components.xml Editor</title>
<para>When editing <property>components.xml</property> a structured tree editor is available in addition to pure source editing.
17 years, 11 months