JBoss Tools SVN: r31101 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-05-05 09:32:04 -0400 (Thu, 05 May 2011)
New Revision: 31101
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
Log:
https://issues.jboss.org/browse/JBIDE-8028
Do not annotate static or final fields
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2011-05-05 13:27:01 UTC (rev 31100)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2011-05-05 13:32:04 UTC (rev 31101)
@@ -16,9 +16,9 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
-import java.util.Map.Entry;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jdt.core.ICompilationUnit;
@@ -31,6 +31,7 @@
import org.eclipse.jdt.core.dom.FieldDeclaration;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.Modifier;
import org.eclipse.jdt.core.dom.ParameterizedType;
import org.eclipse.jdt.core.dom.PrimitiveType;
import org.eclipse.jdt.core.dom.QualifiedType;
@@ -350,6 +351,11 @@
@SuppressWarnings("unchecked")
public boolean visit(FieldDeclaration node) {
+ //do not map static or final fields
+ if ((node.getModifiers() & (Modifier.FINAL | Modifier.STATIC)) != 0){
+ return false;
+ }
+
Type type = node.getType();
if (type == null) {
return true;
13 years, 2 months
JBoss Tools SVN: r31100 - in trunk: vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-05-05 09:27:01 -0400 (Thu, 05 May 2011)
New Revision: 31100
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlEmbedTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlFlashAbstractTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlObjectTemplate.java
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/object-embed.html
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/object-embed.html.xml
Removed:
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/plugins/libnullplugin.so
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/xulrunner/plugins/libnullplugin.so
trunk/xulrunner/plugins/org.mozilla.xulrunner.win32.win32.x86/xulrunner/plugins/npnul32.dll
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8792 : Install flash plugin message appears in VPE if on page used flash references
- removed null-plugins for Linux 32 and 64-bit and Windows 32-bit
- created templates for the <embed> and <object> tags
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2011-05-05 13:22:57 UTC (rev 31099)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2011-05-05 13:27:01 UTC (rev 31100)
@@ -20,6 +20,7 @@
private HTML() {
}
+ public static final String TAG_EMBED = "embed"; //$NON-NLS-1$
public static final String TAG_HTML = "html"; //$NON-NLS-1$
public static final String TAG_HEAD = "head"; //$NON-NLS-1$
public static final String TAG_BODY = "body"; //$NON-NLS-1$
@@ -51,6 +52,7 @@
public static final String TAG_INPUT = "input"; //$NON-NLS-1$
public static final String TAG_BUTTON = "button"; //$NON-NLS-1$
public static final String TAG_OL = "ol"; //$NON-NLS-1$
+ public static final String TAG_OBJECT = "object"; //$NON-NLS-1$
public static final String TAG_UL = "ul"; //$NON-NLS-1$
public static final String TAG_CODE = "code"; //$NON-NLS-1$
public static final String TAG_PRE = "pre"; //$NON-NLS-1$
Added: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlEmbedTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlEmbedTemplate.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlEmbedTemplate.java 2011-05-05 13:27:01 UTC (rev 31100)
@@ -0,0 +1,28 @@
+package org.jboss.tools.vpe.html.template;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.tools.vpe.editor.util.HTML;
+
+/**
+ * Template for {@code <embed>} tag.
+ *
+ * @author Yahor Radtsevich
+ */
+public class HtmlEmbedTemplate extends HtmlFlashAbstractTemplate {
+ List<String> ATTRIBUTES_TO_BE_COPIED = Arrays.asList(
+ "align", "height", "hidden", "hspace", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+ "pluginspage", "src", "vspace", "width");//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+
+ @Override
+ public String getTagName() {
+ return HTML.TAG_EMBED;
+ }
+
+ @Override
+ public List<String> getAttributesToBeCopied() {
+ return ATTRIBUTES_TO_BE_COPIED;
+ }
+
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlFlashAbstractTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlFlashAbstractTemplate.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlFlashAbstractTemplate.java 2011-05-05 13:27:01 UTC (rev 31100)
@@ -0,0 +1,70 @@
+package org.jboss.tools.vpe.html.template;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Base template for {@code <object>} and {@code <embed>} tags.
+ *
+ * @author Yahor Radtsevich
+ */
+public abstract class HtmlFlashAbstractTemplate extends VpeAbstractTemplate {
+ @Override
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ Element sourceElement = (Element) sourceNode;
+ nsIDOMElement wrapper = VisualDomUtil
+ .createBorderlessContainer(visualDocument, HTML.TAG_DIV);
+ String wrapperStyle = "display:inline-block;"; //$NON-NLS-1$
+ if (sourceElement.hasAttribute(HTML.ATTR_WIDTH)) {
+ try {
+ int width = Integer.parseInt(sourceElement.getAttribute(HTML.ATTR_WIDTH));
+ wrapperStyle = VpeStyleUtil.setSizeInStyle(wrapperStyle,
+ HTML.STYLE_PARAMETER_WIDTH, width);
+ } catch (NumberFormatException e) {
+ }
+ }
+ if (sourceElement.hasAttribute(HTML.ATTR_HEIGHT)) {
+ try {
+ int height = Integer.parseInt(sourceElement.getAttribute(HTML.ATTR_HEIGHT));
+ wrapperStyle = VpeStyleUtil.setSizeInStyle(wrapperStyle,
+ HTML.STYLE_PARAMETER_HEIGHT, height);
+ } catch (NumberFormatException e) {
+ }
+ }
+
+ wrapper.setAttribute(HTML.ATTR_STYLE, wrapperStyle);
+
+ nsIDOMElement objectElement = visualDocument.createElement(getTagName());
+ wrapper.appendChild(objectElement);
+ VisualDomUtil.copyAttributes(sourceElement, objectElement, getAttributesToBeCopied());
+
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(objectElement);
+ NodeList children = sourceElement.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ childrenInfo.addSourceChild(children.item(i));
+ }
+
+ VpeCreationData creationData = new VpeCreationData(wrapper);
+ creationData.addChildrenInfo(childrenInfo);
+
+ return creationData;
+ }
+
+ public abstract String getTagName();
+ public abstract List<String> getAttributesToBeCopied();
+
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlObjectTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlObjectTemplate.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlObjectTemplate.java 2011-05-05 13:27:01 UTC (rev 31100)
@@ -0,0 +1,28 @@
+package org.jboss.tools.vpe.html.template;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.tools.vpe.editor.util.HTML;
+
+/**
+ * Template for {@code <object>} tag.
+ *
+ * @author Yahor Radtsevich
+ */
+public class HtmlObjectTemplate extends HtmlFlashAbstractTemplate {
+ List<String> ATTRIBUTES_TO_BE_COPIED = Arrays.asList(
+ "align", "height", "hspace", "vspace", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+ "width", "id", "dir"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+
+ @Override
+ public String getTagName() {
+ return HTML.TAG_OBJECT;
+ }
+
+ @Override
+ public List<String> getAttributesToBeCopied() {
+ return ATTRIBUTES_TO_BE_COPIED;
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2011-05-05 13:22:57 UTC (rev 31099)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2011-05-05 13:27:01 UTC (rev 31100)
@@ -1471,9 +1471,8 @@
</vpe:tag>
<vpe:tag name="object" case-sensitive="no">
- <vpe:template children="yes" modify="no">
- <vpe:copy
- attrs="align,height,hspace,vspace,width,id,dir" />
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.vpe.html.template.HtmlObjectTemplate">
<vpe:dnd>
<vpe:drop container="yes">
<vpe:container-child tag-name="param" />
@@ -1485,10 +1484,9 @@
</vpe:tag>
<vpe:tag name="embed" case-sensitive="no">
- <vpe:template children="yes" modify="no">
- <vpe:copy
- attrs="align,height,hidden,hspace,pluginspage,src,vspace,width" />
- </vpe:template>
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.vpe.html.template.HtmlEmbedTemplate">
+ </vpe:template>
</vpe:tag>
<vpe:tag name="ol" case-sensitive="no">
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/object-embed.html
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/object-embed.html (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/object-embed.html 2011-05-05 13:27:01 UTC (rev 31100)
@@ -0,0 +1,18 @@
+<html>
+<body>
+Abc
+ <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
+ codebase="http://download.macromedia.com/pub/shockwave/
+cabs/flash/swflash.cab#version=6,0,40,0"
+ width="468" height="60" id="object1">
+ <param name="movie" value="example.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="#ffffff" />
+ <embed src="http://www.tizag.com/pics/example.swf" quality="high"
+ bgcolor="#ffffff" width="468" height="60" name="mymoviename" align=""
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.macromedia.com/go/getflashplayer">
+ </object>
+Def
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/object-embed.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/object-embed.html.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/object-embed.html.xml 2011-05-05 13:27:01 UTC (rev 31100)
@@ -0,0 +1,13 @@
+<tests>
+ <test id="object1">
+ <DIV CLASS="vpe-text" STYLE="display: inline-block; width: 468px; height: 60px;">
+ <OBJECT WIDTH="468" HEIGHT="60" ID="object1">
+ <DIV CLASS="vpe-text" STYLE="display: inline-block; width: 468px; height: 60px;">
+ <EMBED WIDTH="468" HEIGHT="60" ALIGN=""
+ PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" SRC="http://www.tizag.com/pics/example.swf">
+ </EMBED>
+ </DIV>
+ </OBJECT>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java 2011-05-05 13:22:57 UTC (rev 31099)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java 2011-05-05 13:27:01 UTC (rev 31100)
@@ -126,8 +126,8 @@
performContentTest("components/core/map.html"); //$NON-NLS-1$
}
- public void testObject() throws Throwable {
- performContentTest("components/core/object.html"); //$NON-NLS-1$
+ public void testObjectEmbed() throws Throwable {
+ performContentTest("components/core/object-embed.html"); //$NON-NLS-1$
}
public void testParam() throws Throwable {
@@ -387,10 +387,6 @@
performContentTest("components/other/center.html"); //$NON-NLS-1$
}
- public void testEmbed() throws Throwable {
- performContentTest("components/other/embed.html"); //$NON-NLS-1$
- }
-
public void testFont() throws Throwable {
performContentTest("components/other/font.html"); //$NON-NLS-1$
}
Deleted: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/plugins/libnullplugin.so
===================================================================
(Binary files differ)
Deleted: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/xulrunner/plugins/libnullplugin.so
===================================================================
(Binary files differ)
Deleted: trunk/xulrunner/plugins/org.mozilla.xulrunner.win32.win32.x86/xulrunner/plugins/npnul32.dll
===================================================================
(Binary files differ)
13 years, 2 months
JBoss Tools SVN: r31099 - in trunk/hibernatetools: tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-05-05 09:22:57 -0400 (Thu, 05 May 2011)
New Revision: 31099
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java
Log:
https://issues.jboss.org/browse/JBIDE-8028
Do not annotate static or final fields
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2011-05-05 10:09:15 UTC (rev 31098)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2011-05-05 13:22:57 UTC (rev 31099)
@@ -421,6 +421,10 @@
}
public boolean visit(FieldDeclaration node) {
+ //do not map static or final fields
+ if ((node.getModifiers() & (Modifier.FINAL | Modifier.STATIC)) != 0){
+ return false;
+ }
Type type = node.getType();
List<String> list = new ArrayList<String>();
Iterator<VariableDeclarationFragment> itVarNames = node.fragments().iterator();
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java 2011-05-05 10:09:15 UTC (rev 31098)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/Country.java 2011-05-05 13:22:57 UTC (rev 31099)
@@ -12,6 +12,10 @@
public class Country {
+ private static int fake_id;
+
+ private final int fake_id2 = 1;
+
private String name;
protected Visa visa;
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java 2011-05-05 10:09:15 UTC (rev 31098)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/Country.java 2011-05-05 13:22:57 UTC (rev 31099)
@@ -12,6 +12,10 @@
public class Country {
+ private static int fake_id;
+
+ private final int fake_id2 = 1;
+
private String name;
public Country(String name) {
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java 2011-05-05 10:09:15 UTC (rev 31098)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/Country.java 2011-05-05 13:22:57 UTC (rev 31099)
@@ -18,6 +18,10 @@
@Entity
public class Country {
+ private static int fake_id;
+
+ private final int fake_id2 = 1;
+
@Column(length=200)
private String name;
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java 2011-05-05 10:09:15 UTC (rev 31098)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/Country.java 2011-05-05 13:22:57 UTC (rev 31099)
@@ -16,6 +16,10 @@
@Entity
public class Country {
+ private static int fake_id;
+
+ private final int fake_id2 = 1;
+
private String name;
protected Country() {
13 years, 2 months
JBoss Tools SVN: r31098 - trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-05 06:09:15 -0400 (Thu, 05 May 2011)
New Revision: 31098
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleDelegate.java
Log:
corrected warnings imports that are not used
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleDelegate.java 2011-05-05 10:06:11 UTC (rev 31097)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleDelegate.java 2011-05-05 10:09:15 UTC (rev 31098)
@@ -13,7 +13,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -21,7 +20,6 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.wst.common.componentcore.ArtifactEdit;
import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
13 years, 2 months
JBoss Tools SVN: r31097 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-05 06:06:11 -0400 (Thu, 05 May 2011)
New Revision: 31097
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java
Log:
corrected warnings imports that are not used
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java 2011-05-05 10:05:57 UTC (rev 31096)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java 2011-05-05 10:06:11 UTC (rev 31097)
@@ -38,7 +38,6 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.sse.ui.internal.IReleasable;
-import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.ui.internal.contentoutline.XMLNodeActionManager;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
13 years, 2 months
JBoss Tools SVN: r31096 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/proposals.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-05 06:05:57 -0400 (Thu, 05 May 2011)
New Revision: 31096
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/proposals/IServiceXMLQuickFixProposalProvider.java
Log:
corrected warnings imports that are not used
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/proposals/IServiceXMLQuickFixProposalProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/proposals/IServiceXMLQuickFixProposalProvider.java 2011-05-05 09:59:01 UTC (rev 31095)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/proposals/IServiceXMLQuickFixProposalProvider.java 2011-05-05 10:05:57 UTC (rev 31096)
@@ -23,7 +23,6 @@
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
/**
*
13 years, 2 months
JBoss Tools SVN: r31095 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-05 05:59:01 -0400 (Thu, 05 May 2011)
New Revision: 31095
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/SharedImages.java
Log:
corrected warning for raw type usage
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/SharedImages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/SharedImages.java 2011-05-05 09:55:49 UTC (rev 31094)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/SharedImages.java 2011-05-05 09:59:01 UTC (rev 31095)
@@ -37,18 +37,18 @@
private static SharedImages instance;
- private Hashtable images, descriptors;
+ private Hashtable<String, Object> images, descriptors;
private SharedImages () {
instance = this;
- images = new Hashtable();
- descriptors = new Hashtable();
+ images = new Hashtable<String, Object>();
+ descriptors = new Hashtable<String, Object>();
Bundle pluginBundle = Activator.getDefault().getBundle();
descriptors.put(IMG_MBEAN, createImageDescriptor(pluginBundle, "icons/mbean16")); //$NON-NLS-1$
- Iterator iter = descriptors.keySet().iterator();
+ Iterator<String> iter = descriptors.keySet().iterator();
while (iter.hasNext()) {
String key = (String) iter.next();
@@ -90,7 +90,7 @@
}
protected void finalize() throws Throwable {
- Iterator iter = images.keySet().iterator();
+ Iterator<String> iter = images.keySet().iterator();
while (iter.hasNext())
{
Image image = (Image) images.get(iter.next());
13 years, 2 months
JBoss Tools SVN: r31094 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-05 05:55:49 -0400 (Thu, 05 May 2011)
New Revision: 31094
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
corrected warnings about non-nls strings
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 2011-05-05 09:54:52 UTC (rev 31093)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2011-05-05 09:55:49 UTC (rev 31094)
@@ -639,7 +639,7 @@
}
protected boolean isHomeValid() {
- if( homeDir == null || homeDir.equals("") || !(new File(homeDir).exists())) return false;
+ if( homeDir == null || homeDir.length() == 1 || !(new File(homeDir).exists())) return false; //$NON-NLS-1$
return new Path(homeDir).append("bin").append("run.jar").toFile().exists(); //$NON-NLS-1$ //$NON-NLS-2$
}
13 years, 2 months
JBoss Tools SVN: r31093 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-05 05:54:52 -0400 (Thu, 05 May 2011)
New Revision: 31093
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
Log:
corrected warnings about ServerWorkingCopy type (which is internal) and replaced by IServerWorkingCopy
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2011-05-05 09:49:57 UTC (rev 31092)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2011-05-05 09:54:52 UTC (rev 31093)
@@ -4,7 +4,7 @@
* 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
+ * 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.
@@ -45,8 +45,6 @@
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.TaskModel;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
@@ -59,12 +57,12 @@
/**
*
* @author Rob Stryker <rob.stryker(a)redhat.com>
- *
+ *
*/
public class StrippedServerWizardFragment extends WizardFragment {
private IWizardHandle handle;
-
+
private Label deployLabel, nameLabel;
private Text deployText, nameText;
private Button browse;
@@ -72,7 +70,7 @@
public StrippedServerWizardFragment() {
}
-
+
public Composite createComposite(Composite parent, IWizardHandle handle) {
this.handle = handle;
Composite main = new Composite(parent, SWT.NONE);
@@ -81,7 +79,7 @@
nameLabel = new Label(main, SWT.NONE);
nameText = new Text(main, SWT.BORDER);
nameLabel.setText(Messages.serverName);
-
+
deployLabel = new Label(main, SWT.NONE);
deployText = new Text(main, SWT.BORDER);
browse = new Button(main, SWT.PUSH);
@@ -89,61 +87,62 @@
browse.setText(Messages.browse);
FormData namelData = new FormData();
- namelData.top = new FormAttachment(0,5);
- namelData.left = new FormAttachment(0,5);
+ namelData.top = new FormAttachment(0, 5);
+ namelData.left = new FormAttachment(0, 5);
nameLabel.setLayoutData(namelData);
-
+
FormData nametData = new FormData();
- nametData.top = new FormAttachment(0,5);
- nametData.left = new FormAttachment(deployLabel,5);
- nametData.right = new FormAttachment(100,-5);
+ nametData.top = new FormAttachment(0, 5);
+ nametData.left = new FormAttachment(deployLabel, 5);
+ nametData.right = new FormAttachment(100, -5);
nameText.setLayoutData(nametData);
-
+
FormData lData = new FormData();
- lData.top = new FormAttachment(nameText,5);
- lData.left = new FormAttachment(0,5);
+ lData.top = new FormAttachment(nameText, 5);
+ lData.left = new FormAttachment(0, 5);
deployLabel.setLayoutData(lData);
-
+
FormData tData = new FormData();
- tData.top = new FormAttachment(nameText,5);
- tData.left = new FormAttachment(deployLabel,5);
+ tData.top = new FormAttachment(nameText, 5);
+ tData.left = new FormAttachment(deployLabel, 5);
tData.right = new FormAttachment(browse, -5);
deployText.setLayoutData(tData);
FormData bData = new FormData();
- bData.right = new FormAttachment(100,-5);
- bData.top = new FormAttachment(nameText,5);
+ bData.right = new FormAttachment(100, -5);
+ bData.top = new FormAttachment(nameText, 5);
browse.setLayoutData(bData);
-
+
ModifyListener ml = new ModifyListener() {
public void modifyText(ModifyEvent e) {
textChanged();
}
};
-
+
browse.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
+
public void widgetSelected(SelectionEvent e) {
DirectoryDialog d = new DirectoryDialog(new Shell());
d.setFilterPath(deployText.getText());
String x = d.open();
- if( x != null )
+ if (x != null)
deployText.setText(x);
- }
+ }
});
-
deployText.addModifyListener(ml);
nameText.addModifyListener(ml);
nameText.setText(getDefaultNameText());
- handle.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.WIZBAN_JBOSS_LOGO));
+ handle.setImageDescriptor(JBossServerUISharedImages
+ .getImageDescriptor(JBossServerUISharedImages.WIZBAN_JBOSS_LOGO));
return main;
}
protected void textChanged() {
IStatus status = checkErrors();
- if( status.isOK() ) {
+ if (status.isOK()) {
deployLoc = deployText.getText();
name = nameText.getText();
handle.setMessage("", IStatus.OK); //$NON-NLS-1$
@@ -152,63 +151,58 @@
handle.setMessage(status.getMessage(), IStatus.WARNING);
}
}
-
+
protected IStatus checkErrors() {
- if( findServer(nameText.getText()) != null ) {
- return new Status(IStatus.WARNING, JBossServerUIPlugin.PLUGIN_ID, IStatus.OK, Messages.StrippedServerWizardFragment_NameInUseStatusMessage, null);
+ if (findServer(nameText.getText()) != null) {
+ return new Status(IStatus.WARNING, JBossServerUIPlugin.PLUGIN_ID, IStatus.OK,
+ Messages.StrippedServerWizardFragment_NameInUseStatusMessage, null);
}
File f = new File(deployText.getText());
- if( !f.exists() || !f.isDirectory() ) {
- return new Status(IStatus.WARNING, JBossServerUIPlugin.PLUGIN_ID, IStatus.OK, Messages.StrippedServerWizardFragment_DeployFolderDoesNotExistStatusMessage, null);
+ if (!f.exists() || !f.isDirectory()) {
+ return new Status(IStatus.WARNING, JBossServerUIPlugin.PLUGIN_ID, IStatus.OK,
+ Messages.StrippedServerWizardFragment_DeployFolderDoesNotExistStatusMessage, null);
}
return new Status(IStatus.OK, JBossServerUIPlugin.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
}
-
+
public void enter() {
handle.setTitle(Messages.sswf_Title);
IServer s = (IServer) getTaskModel().getObject(TaskModel.TASK_SERVER);
IServerWorkingCopy swc;
- if( s instanceof IServerWorkingCopy)
- swc = (IServerWorkingCopy)s;
+ if (s instanceof IServerWorkingCopy)
+ swc = (IServerWorkingCopy) s;
else
swc = s.createWorkingCopy();
-
- ServerWorkingCopy swcInternal;
- if( swc instanceof ServerWorkingCopy ) {
- swcInternal = (ServerWorkingCopy)swc;
- deployText.setText(swcInternal.getAttribute(DeployableServer.DEPLOY_DIRECTORY, "")); //$NON-NLS-1$
- }
+
+ deployText.setText(swc.getAttribute(DeployableServer.DEPLOY_DIRECTORY, "")); //$NON-NLS-1$
}
+
public void exit() {
textChanged();
IServer s = (IServer) getTaskModel().getObject(TaskModel.TASK_SERVER);
IServerWorkingCopy swc;
- if( s instanceof IServerWorkingCopy)
- swc = (IServerWorkingCopy)s;
+ if (s instanceof IServerWorkingCopy)
+ swc = (IServerWorkingCopy) s;
else
swc = s.createWorkingCopy();
-
- ServerWorkingCopy swcInternal;
- if( swc instanceof ServerWorkingCopy ) {
- swcInternal = (ServerWorkingCopy)swc;
- swcInternal.setName(name);
- swcInternal.setAttribute(DeployableServer.DEPLOY_DIRECTORY, deployLoc);
- String tempFolder = JBossServerCorePlugin.getServerStateLocation(s).append(IJBossServerConstants.TEMP_DEPLOY).makeAbsolute().toString();
- swcInternal.setAttribute(DeployableServer.TEMP_DEPLOY_DIRECTORY, tempFolder);
- getTaskModel().putObject(TaskModel.TASK_SERVER, swcInternal);
- }
+
+ swc.setName(name);
+ swc.setAttribute(DeployableServer.DEPLOY_DIRECTORY, deployLoc);
+ String tempFolder = JBossServerCorePlugin.getServerStateLocation(s)
+ .append(IJBossServerConstants.TEMP_DEPLOY).makeAbsolute().toString();
+ swc.setAttribute(DeployableServer.TEMP_DEPLOY_DIRECTORY, tempFolder);
+ getTaskModel().putObject(TaskModel.TASK_SERVER, swc);
}
-
+
public void performFinish(IProgressMonitor monitor) throws CoreException {
IServerWorkingCopy serverWC = (IServerWorkingCopy) getTaskModel().getObject(TaskModel.TASK_SERVER);
- ServerWorkingCopy serverwc2 = (serverWC instanceof ServerWorkingCopy ? ((ServerWorkingCopy)serverWC) : null);
-
+
try {
- serverwc2.setServerConfiguration(null);
- serverwc2.setName(name);
- serverwc2.setAttribute(DeployableServer.DEPLOY_DIRECTORY, deployLoc);
- getTaskModel().putObject(TaskModel.TASK_SERVER, serverwc2);
- } catch( Exception ce ) {
+ serverWC.setServerConfiguration(null);
+ serverWC.setName(name);
+ serverWC.setAttribute(DeployableServer.DEPLOY_DIRECTORY, deployLoc);
+ getTaskModel().putObject(TaskModel.TASK_SERVER, serverWC);
+ } catch (Exception ce) {
}
}
@@ -219,21 +213,20 @@
public boolean hasComposite() {
return true;
}
-
+
private String getDefaultNameText() {
Object o = getTaskModel().getObject(TaskModel.TASK_SERVER);
- return ((ServerWorkingCopy)o).getName();
+ return ((IServerWorkingCopy) o).getName();
}
-
+
private IServer findServer(String name) {
IServer[] servers = ServerCore.getServers();
- for( int i = 0; i < servers.length; i++ ) {
- Server server = (Server) servers[i];
+ for (int i = 0; i < servers.length; i++) {
+ IServer server = servers[i];
if (name.equals(server.getName()))
return server;
}
return null;
}
-
}
13 years, 2 months
JBoss Tools SVN: r31092 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-05 05:49:57 -0400 (Thu, 05 May 2011)
New Revision: 31092
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
Log:
corrected warning about variable that was not used
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2011-05-05 09:48:47 UTC (rev 31091)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2011-05-05 09:49:57 UTC (rev 31092)
@@ -44,11 +44,8 @@
import org.eclipse.wst.server.core.TaskModel;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.editor.IDeploymentTypeUI.IServerModeUICallback;
@@ -80,8 +77,8 @@
IRuntime r = (IRuntime) getTaskModel()
.getObject(TaskModel.TASK_RUNTIME);
String version = r.getRuntimeType().getVersion();
- if( isEAP() && version.startsWith("5."))
- version = "5.x";
+ if( isEAP() && version.startsWith("5.")) //$NON-NLS-1$
+ version = "5.x"; //$NON-NLS-1$
String description = NLS.bind(
isEAP() ? Messages.JBEAP_version : Messages.JBAS_version,
version);
@@ -173,7 +170,7 @@
g.setLayoutData(groupData);
g.setLayout(new FillLayout());
- Composite child = new ServerModeSectionComposite(g, SWT.NONE, new NewServerWizardBehaviourCallback());
+ new ServerModeSectionComposite(g, SWT.NONE, new NewServerWizardBehaviourCallback());
}
private class NewServerWizardBehaviourCallback implements IServerModeUICallback {
13 years, 2 months