JBoss Tools SVN: r8390 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-05-28 04:38:30 -0400 (Wed, 28 May 2008)
New Revision: 8390
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/unresolved_image.gif
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
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/VpeStyleUtil.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2043,
Template was added for <img> tag, if there is an alt attribute it is displayed, otherwise unknown images is displayed.
Method in VpeStyleUtil was corrected, references to this method in Panel Menu Group and Item were corrected.
Added: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/unresolved_image.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/unresolved_image.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2008-05-28 08:38:22 UTC (rev 8389)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2008-05-28 08:38:30 UTC (rev 8390)
@@ -107,5 +107,16 @@
}
}
+ public static String getPluginResourcePath() {
+ Bundle bundle = Platform.getBundle(PLUGIN_ID);
+ URL url = null;
+ try {
+ url = bundle == null ? null : FileLocator.resolve(bundle.getEntry("/resources"));
+ } catch (Exception e) {
+ url = bundle.getEntry("/resources");
+ }
+ return (url == null) ? null : url.getPath();
+ }
+
}
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 2008-05-28 08:38:22 UTC (rev 8389)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-05-28 08:38:30 UTC (rev 8390)
@@ -84,6 +84,8 @@
public static final String ATTR_ROWS = "rows"; //$NON-NLS-1$
public static final String ATTR_COLS = "cols"; //$NON-NLS-1$
public static final String ATTR_VALIGN = "valign"; //$NON-NLS-1$
+ public static final String ATTR_SRC = "src"; //$NON-NLS-1$
+ public static final String ATTR_ALT = "alt"; //$NON-NLS-1$
public static final String VALUE_TOP_ALIGN = "top"; //$NON-NLS-1$
public static final String VALUE_MIDDLE_ALIGN = "middle"; //$NON-NLS-1$
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-05-28 08:38:22 UTC (rev 8389)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-05-28 08:38:30 UTC (rev 8390)
@@ -26,6 +26,7 @@
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.web.project.WebProject;
+import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.css.ResourceReference;
@@ -38,8 +39,10 @@
public class VpeStyleUtil {
- public static final String ATTRIBUTE_STYLE = "style"; //$NON-NLS-1$
+ public static final String UNRESOLVED_IMAGE_PATH = "org/jboss/tools/vpe/editor/mozilla/icons/unresolved_image.gif"; //$NON-NLS-1$
+ public static final String ATTRIBUTE_STYLE = "style"; //$NON-NLS-1$
+
public static final String PARAMETER_POSITION = "position"; //$NON-NLS-1$
public static final String PARAMETER_TOP = "top"; //$NON-NLS-1$
public static final String PARAMETER_LEFT = "left"; //$NON-NLS-1$
@@ -517,23 +520,36 @@
*
* @param path image "src" attribute value
* @param pageContext the pageContext
+ * @param showUnresolvedImage flag to display unresolved image
*
* @return the full path to image "src" attribute
*/
public static String addFullPathToImgSrc(String path,
- VpePageContext pageContext) {
+ VpePageContext pageContext, boolean showUnresolvedImage) {
IPath tagPath = new Path(path);
if (tagPath.isEmpty()) {
- return path;
+ if (showUnresolvedImage) {
+ return FILE_PROTOCOL + SLASH + SLASH
+ + getAbsoluteResourcePath(UNRESOLVED_IMAGE_PATH);
+ } else {
+ return path;
+ }
}
+
+
String device = (tagPath.getDevice() == null ? tagPath.segment(0)
: tagPath.getDevice());
if (device != null
&& (HTTP_PROTOCOL.equalsIgnoreCase(device) || FILE_PROTOCOL
.equalsIgnoreCase(device))) {
- return path;
+ if (showUnresolvedImage) {
+ return FILE_PROTOCOL + SLASH + SLASH
+ + getAbsoluteResourcePath(UNRESOLVED_IMAGE_PATH);
+ } else {
+ return path;
+ }
}
File locFile = tagPath.toFile();
@@ -593,7 +609,12 @@
}
}
}
- return path;
+ if (showUnresolvedImage) {
+ return FILE_PROTOCOL + SLASH + SLASH
+ + getAbsoluteResourcePath(UNRESOLVED_IMAGE_PATH);
+ } else {
+ return path;
+ }
}
/**
@@ -684,5 +705,17 @@
.getDOMDocument().createTextNode(text));
}
+
+ public static String getAbsoluteResourcePath(String resourcePathInPlugin) {
+ String pluginPath = VpePlugin.getPluginResourcePath();
+ IPath pluginFile = new Path(pluginPath);
+ File file = pluginFile.append(resourcePathInPlugin).toFile();
+ if (file.exists()) {
+ return file.getAbsolutePath();
+ } else {
+ throw new RuntimeException("Can't get path for " //$NON-NLS-1$
+ + resourcePathInPlugin);
+ }
+ }
}
\ No newline at end of file
16 years
JBoss Tools SVN: r8389 - trunk/vpe/plugins/org.jboss.tools.vpe.html/templates.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-05-28 04:38:22 -0400 (Wed, 28 May 2008)
New Revision: 8389
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-2043,
Template was added for <img> tag, if there is an alt attribute it is displayed, otherwise unknown images is displayed.
Method in VpeStyleUtil was corrected, references to this method in Panel Menu Group and Item were corrected.
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 2008-05-27 19:23:23 UTC (rev 8388)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-05-28 08:38:22 UTC (rev 8389)
@@ -1077,35 +1077,15 @@
</vpe:tag>
<vpe:tag name="img" case-sensitive="no">
- <!-- in this case the tag is a facelets's tag -->
- <vpe:if test="attrpresent('jsfc')" >
- <vpe:template children="no" modify="no">
- <vpe:copy
- attrs="style,class,width,height,border,hspace,vspace">
- <vpe:attribute name="src" value="{src(@value)}" />
- </vpe:copy>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
- </vpe:template>
- </vpe:if>
- <!-- default template -->
- <vpe:template children="no" modify="no">
- <vpe:copy
- attrs="style,class,width,height,border,hspace,vspace">
- <vpe:attribute name="src" value="{src(@src)}" />
- </vpe:copy>
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- </vpe:dnd>
+ <vpe:template children="no" modify="no"
+ class="org.jboss.tools.vpe.html.template.HtmlImgTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
</vpe:template>
</vpe:tag>
16 years
JBoss Tools SVN: r8388 - branches/jbosstools-2.1.x/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-05-27 15:23:23 -0400 (Tue, 27 May 2008)
New Revision: 8388
Modified:
branches/jbosstools-2.1.x/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2004 Create JUnit tests for New Seam Action/Form/Conversation/Entity wizards. It should invoke seam-gen and check results of its work.
JUnit TestCases are created (No test project templates are required)
Modified: branches/jbosstools-2.1.x/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java
===================================================================
--- branches/jbosstools-2.1.x/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java 2008-05-27 19:19:57 UTC (rev 8387)
+++ branches/jbosstools-2.1.x/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java 2008-05-27 19:23:23 UTC (rev 8388)
@@ -13,6 +13,7 @@
import junit.extensions.TestSetup;
import junit.framework.Test;
+import org.eclipse.core.internal.resources.ResourceException;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
@@ -65,7 +66,11 @@
IResource project = ResourcesPlugin.getWorkspace().getRoot().findMember(projectName);
assertNotNull("Can't load " + projectName, project);
IProject result = project.getProject();
- result.build(IncrementalProjectBuilder.FULL_BUILD, null);
+ try {
+ result.build(IncrementalProjectBuilder.FULL_BUILD, null);
+ } catch (ResourceException e) {
+ JUnitUtils.fail(e.getMessage(), e);
+ }
EditorTestHelper.joinBackgroundActivities();
return result;
}
16 years
JBoss Tools SVN: r8387 - trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-05-27 15:19:57 -0400 (Tue, 27 May 2008)
New Revision: 8387
Modified:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2004 Create JUnit tests for New Seam Action/Form/Conversation/Entity wizards. It should invoke seam-gen and check results of its work.
JUnit TestCases are created (No test project templates are required)
Modified: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java 2008-05-27 19:15:00 UTC (rev 8386)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java 2008-05-27 19:19:57 UTC (rev 8387)
@@ -13,6 +13,7 @@
import junit.extensions.TestSetup;
import junit.framework.Test;
+import org.eclipse.core.internal.resources.ResourceException;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
@@ -65,7 +66,11 @@
IResource project = ResourcesPlugin.getWorkspace().getRoot().findMember(projectName);
assertNotNull("Can't load " + projectName, project);
IProject result = project.getProject();
- result.build(IncrementalProjectBuilder.FULL_BUILD, null);
+ try {
+ result.build(IncrementalProjectBuilder.FULL_BUILD, null);
+ } catch (ResourceException e) {
+ JUnitUtils.fail(e.getMessage(), e);
+ }
EditorTestHelper.joinBackgroundActivities();
return result;
}
16 years
JBoss Tools SVN: r8381 - in trunk/seam/tests/org.jboss.tools.seam.ui.test/projects: seam_war and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-05-27 15:05:45 -0400 (Tue, 27 May 2008)
New Revision: 8381
Removed:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_ear/.classpath
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_ear/.project
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/.classpath
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/.project
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/hibernate-console.properties
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/seam_war.launch
Log:
http://jira.jboss.com/jira/browse/JBIDE-2004 Create JUnit tests for New Seam Action/Form/Conversation/Entity wizards. It should invoke seam-gen and check results of its work.
JUnit TestCases are created (No test project templates are required)
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_ear/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_ear/.classpath 2008-05-27 18:59:52 UTC (rev 8380)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_ear/.classpath 2008-05-27 19:05:45 UTC (rev 8381)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_07"/>
- <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 4.2 Runtime"/>
- <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
- <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
- <classpathentry kind="output" path="build/classes"/>
-</classpath>
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_ear/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_ear/.project 2008-05-27 18:59:52 UTC (rev 8380)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_ear/.project 2008-05-27 19:05:45 UTC (rev 8381)
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>seam_ear</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.jboss.tools.common.verification.verifybuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.jboss.tools.seam.core.seambuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.hibernate.eclipse.console.hibernateBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.jboss.tools.jsf.jsfnature</nature>
- <nature>org.jboss.tools.seam.core.seamnature</nature>
- <nature>org.hibernate.eclipse.console.hibernateNature</nature>
- </natures>
-</projectDescription>
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/.classpath 2008-05-27 18:59:52 UTC (rev 8380)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/.classpath 2008-05-27 19:05:45 UTC (rev 8381)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="WebContent/WEB-INF/dev" path="src/action"/>
- <classpathentry kind="src" path="src/model"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_07"/>
- <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 4.2 Runtime"/>
- <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
- <classpathentry kind="output" path="build/classes"/>
-</classpath>
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/.project 2008-05-27 18:59:52 UTC (rev 8380)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/.project 2008-05-27 19:05:45 UTC (rev 8381)
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>seam_war</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.jboss.tools.common.verification.verifybuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.jboss.tools.seam.core.seambuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.hibernate.eclipse.console.hibernateBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.jboss.tools.jsf.jsfnature</nature>
- <nature>org.jboss.tools.seam.core.seamnature</nature>
- <nature>org.hibernate.eclipse.console.hibernateNature</nature>
- </natures>
-</projectDescription>
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/hibernate-console.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/hibernate-console.properties 2008-05-27 18:59:52 UTC (rev 8380)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/hibernate-console.properties 2008-05-27 19:05:45 UTC (rev 8381)
@@ -1,10 +0,0 @@
-#File used by hibernate tools to override <datasource> and other container specific settings in persistence.xml
-hibernate.connection.password=
-hibernate.connection.username=sa
-hibernate.connection.driver_class=org.hsqldb.jdbcDriver
-hibernate.dialect=org.hibernate.dialect.HSQLDialect
-hibernate.connection.url=jdbc:hsqldb:.
-
-hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider
-hibernate.datasource=
-hibernate.transaction.manager_lookup_class=
\ No newline at end of file
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/seam_war.launch
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/seam_war.launch 2008-05-27 18:59:52 UTC (rev 8380)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/seam_war/seam_war.launch 2008-05-27 19:05:45 UTC (rev 8381)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Hibernate Console launch configuration -->
-<launchConfiguration type="org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType">
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="seam_war"/>
-<stringAttribute key="org.hibernate.eclipse.launch.PROPERTY_FILE" value="/seam_war/hibernate-console.properties"/>
-<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY" value="JPA"/>
-</launchConfiguration>
16 years