JBoss Tools SVN: r6897 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-12 11:45:59 -0400 (Wed, 12 Mar 2008)
New Revision: 6897
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1845
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java 2008-03-12 15:12:43 UTC (rev 6896)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/model/impl/ExporterFactory.java 2008-03-12 15:45:59 UTC (rev 6897)
@@ -178,19 +178,27 @@
exporter.setArtifactCollector(collector);
exporter.setOutputDirectory(new File(defaultOutputDirectory));
+ String outputPath = defaultOutputDirectory;
if(props.containsKey("outputdir")) {
- String resolvedOutputDir = resolve(props.getProperty("outputdir"));
- String loc = PathHelper.getLocationAsStringPath(resolvedOutputDir);
- if(loc==null) {
- throw new HibernateConsoleRuntimeException("Output directory '" + resolvedOutputDir + "' in " + getExporterDefinition().getDescription() + " does not exist.");
- }
- props.remove("outputdir"); // done to avoid validation check in hibernate tools templates
- if(StringHelper.isNotEmpty(loc)) { // only set if something valid found
- outputDirectories.add(loc);
- exporter.setOutputDirectory(new File(loc));
- }
- }
+ outputPath = props.getProperty("outputdir");
+ props.remove("outputdir"); // done to avoid validation check in hibernate tools templates
+ }
+ if (outputPath == null){
+ throw new HibernateConsoleRuntimeException("Output directory is not specified in " + getExporterDefinition().getDescription() );
+ }
+
+ String resolvedOutputDir = resolve(outputPath);
+ String loc = PathHelper.getLocationAsStringPath(resolvedOutputDir);
+ if(loc==null) {
+ throw new HibernateConsoleRuntimeException("Output directory '" + resolvedOutputDir + "' in " + getExporterDefinition().getDescription() + " does not exist.");
+ }
+
+ if(StringHelper.isNotEmpty(loc)) { // only set if something valid found
+ outputDirectories.add(loc);
+ exporter.setOutputDirectory(new File(loc));
+ }
+
exporter.setConfiguration(cfg);
List templatePathList = new ArrayList();
@@ -204,10 +212,16 @@
}
props.remove("template_path"); // done to avoid validation check in hibernate tools templates
}
- String resolvedCustomTemplatePath = resolve(customTemplatePath);
- if(StringHelper.isNotEmpty(resolvedCustomTemplatePath)) {
- templatePathList.add(resolvedCustomTemplatePath);
+ if (StringHelper.isNotEmpty(customTemplatePath)){
+ String resolvedCustomTemplatePath = resolve(customTemplatePath);
+ String locationAsStringPath = PathHelper.getLocationAsStringPath(resolvedCustomTemplatePath);
+ if(locationAsStringPath != null) {
+ templatePathList.add(locationAsStringPath);
+ } else {
+ throw new HibernateConsoleRuntimeException("Template directory '" + resolvedCustomTemplatePath + "' in " + getExporterDefinition().getDescription() + " does not exist.");
+ }
}
+
exporter.setTemplatePath((String[]) templatePathList.toArray(new String[templatePathList.size()]));
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-03-12 15:12:43 UTC (rev 6896)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-03-12 15:45:59 UTC (rev 6897)
@@ -32,11 +32,9 @@
import org.eclipse.core.filebuffers.FileBuffers;
import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.manipulation.ContainerCreator;
import org.eclipse.core.filebuffers.manipulation.FileBufferOperationRunner;
import org.eclipse.core.filebuffers.manipulation.MultiTextEditWithProgress;
import org.eclipse.core.filebuffers.manipulation.TextFileBufferOperation;
-import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -44,7 +42,6 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
@@ -132,7 +129,6 @@
}
Set outputDirectories = new HashSet();
- outputDirectories.add((String)attributes.getOutputPath());
ExporterFactory[] exporters = (ExporterFactory[]) exporterFactories.toArray( new ExporterFactory[exporterFactories.size()] );
ArtifactCollector collector = runExporters(attributes, exporters, outputDirectories, monitor);
@@ -210,27 +206,6 @@
if (monitor.isCanceled())
return null;
-
- String outputPathRes = PathHelper.getLocationAsStringPath(attributes.getOutputPath());
- if (outputPathRes == null && StringHelper.isNotEmpty(attributes.getOutputPath())){
- ContainerCreator cc = new ContainerCreator(ResourcesPlugin.getWorkspace(), PathHelper.pathOrNull(attributes.getOutputPath()));
- IFolder folder = (IFolder) cc.createContainer(new NullProgressMonitor());
- if (folder != null) {
- outputPathRes = PathHelper.getLocation( folder ).toOSString();
- }
- }
- final String fOutputPathRes = outputPathRes;
-
- String templatePath = PathHelper.getLocationAsStringPath(attributes.getTemplatePath());
- if (templatePath == null && StringHelper.isNotEmpty(attributes.getTemplatePath())){
- ContainerCreator cc = new ContainerCreator(ResourcesPlugin.getWorkspace(), PathHelper.pathOrNull(attributes.getTemplatePath()));
- IFolder folder = (IFolder) cc.createContainer(new NullProgressMonitor());
- if (folder != null) {
- templatePath = PathHelper.getLocation( folder ).toOSString();
- }
- }
- final String fTemplatePath = templatePath;
-
ConsoleConfiguration cc = KnownConfigurations.getInstance().find(attributes.getConsoleConfigurationName());
if (attributes.isReverseEngineer()) {
monitor.subTask("reading jdbc metadata");
@@ -246,12 +221,6 @@
public Object execute() {
ArtifactCollector artifactCollector = new ArtifactCollector();
-
- String templatePaths = null;
-
- if(StringHelper.isNotEmpty(fTemplatePath)) {
- templatePaths = fTemplatePath;
- }
// Global properties
Properties props = new Properties();
@@ -267,7 +236,7 @@
Exporter exporter;
try {
- exporter = exporterFactories[i].createConfiguredExporter(cfg, fOutputPathRes, templatePaths, globalProperties, outputDirectories, artifactCollector);
+ exporter = exporterFactories[i].createConfiguredExporter(cfg, attributes.getOutputPath(), attributes.getTemplatePath(), globalProperties, outputDirectories, artifactCollector);
} catch (CoreException e) {
throw new HibernateConsoleRuntimeException("Error while setting up " + exporterFactories[i].getExporterDefinition(), e);
}
16 years, 3 months
JBoss Tools SVN: r6896 - trunk/jst/plugins/org.jboss.tools.jst.web/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-12 11:12:43 -0400 (Wed, 12 Mar 2008)
New Revision: 6896
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties
Log:
JBIDE-1894
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties 2008-03-12 14:58:55 UTC (rev 6895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties 2008-03-12 15:12:43 UTC (rev 6896)
@@ -26,10 +26,12 @@
FileXML=/struts/FileXML.html
-FileXML_Properties=/struts/FileXML_Properties.html
FileXML_Properties.WindowTitle=Properties
FileXML_Properties.Title=File XML
+FileXML_Rename.WindowTitle=Rename
+FileXML_Rename.Title=File XML
+
FileTLD=/struts/FileTLD.html
FileTLD_Properties=/struts/FileTLD_Properties.html
@@ -41,15 +43,18 @@
FileJS_Properties=/model/noHelpYet.html
FileJS_Properties.WindowTitle=Properties
FileJS_Properties.Title=File JS
-FileJS_Rename=/model/noHelpYet.html
+FileJS_Rename.WindowTitle=Rename
+FileJS_Rename.Title=File CSS
FileCSS=/struts/FileCSS.html
FileCSS_Properties=/model/noHelpYet.html
FileCSS_Properties.WindowTitle=Properties
FileCSS_Properties.Title=File CSS
-FileCSS_Rename=/model/noHelpYet.html
+FileCSS_Rename.WindowTitle=Rename
+FileCSS_Rename.Title=File CSS
+
### Struts PRO
##### Create TLD File #####
16 years, 3 months
JBoss Tools SVN: r6895 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-12 10:58:55 -0400 (Wed, 12 Mar 2008)
New Revision: 6895
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
Log:
JBIDE-1785 Spelling corrected
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java 2008-03-12 14:56:11 UTC (rev 6894)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java 2008-03-12 14:58:55 UTC (rev 6895)
@@ -38,7 +38,7 @@
* 2. Create N=1000 java files with seam components in the project and refresh it.
* 3. Reload Seam model and compute times T1 and T2 needed
* to process first K=200 files and last K=200 files.
- * 4. Test files if T2 is 3 or more times larger than T1,
+ * 4. Test fails if T2 is 3 or more times larger than T1,
* which positively implies N*N dependency.
*
* @author Viacheslav Kabanovich
16 years, 3 months
JBoss Tools SVN: r6894 - in trunk/seam/tests/org.jboss.tools.seam.core.test: projects/SeamWebWarTestProject/src/action and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-12 10:56:11 -0400 (Wed, 12 Mar 2008)
New Revision: 6894
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/p/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/p/placeholder
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/template.txt
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectGenerator.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
Log:
JBIDE-1785 Test added
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/p/placeholder
===================================================================
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/template.txt
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/template.txt (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/template.txt 2008-03-12 14:56:11 UTC (rev 6894)
@@ -0,0 +1,43 @@
+package %p%;
+
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+
+@Name("%x#%.%T%")
+public class %T% {
+
+ @In @Out
+ private String %s%;
+
+ @In @Out
+ private String %t%;
+
+ @Factory("%s%")
+ public String s() {
+ return "a";
+ }
+
+ @Factory("%t%")
+ public String t() {
+ return "a";
+ }
+
+ public String get%S%() {
+ return %s%;
+ }
+
+ public void set%S%(String s) {
+ this.%s% = s;
+ }
+
+ public String get%T%() {
+ return %t%;
+ }
+
+ public void set%T%(String t) {
+ this.%t% = t;
+ }
+
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectGenerator.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectGenerator.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectGenerator.java 2008-03-12 14:56:11 UTC (rev 6894)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.core.test;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.common.util.FileUtil;
+
+public class SeamBigProjectGenerator {
+ int classesCount = 1000;
+ int filesInFolderLimit = 6;
+ int folderDepth = 6;
+
+ public void generate(IResource resource, File templateFile) {
+ File root = resource.getLocation().toFile();
+ String pack = root.getName();
+ if(!templateFile.isFile()) {
+ throw new IllegalArgumentException("No template file found " + templateFile);
+ }
+ String text = FileUtil.readFile(templateFile);
+
+ int depth = 0;
+ int i = 0;
+ while(i < classesCount) {
+ while(getFolderCount(root) >= filesInFolderLimit || (getFileCount(root) >= filesInFolderLimit && depth == folderDepth) || depth > folderDepth) {
+ root = root.getParentFile();
+ int q = pack.lastIndexOf('.');
+ if(q >= 0) pack = pack.substring(0, q);
+ depth--;
+ }
+ i++;
+ if(getFileCount(root) >= filesInFolderLimit) {
+ root = new File(root, "p" + i);
+ root.mkdirs();
+ pack += "." + root.getName();
+ depth++;
+ }
+ File f = new File(root, "T" + i + ".java");
+
+ FileUtil.writeFile(f, replace(text, i, pack));
+
+ }
+
+ try {
+ resource.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ String replace(String text, int n, String pack) {
+ StringBuffer sb = new StringBuffer();
+ int i = 0;
+ while(true) {
+ int jb = text.indexOf('%', i);
+ if(jb < 0) break;
+ int je = text.indexOf('%', jb + 1);
+ if(je < 0) break;
+ sb.append(text.substring(i, jb));
+ String r = text.substring(jb + 1, je);
+ if(r.equals("p")) {
+ r = pack;
+ } else if(r.endsWith("#")) {
+ r = r.substring(0, r.length() - 1) + (int)(10 * Math.random());
+ } else {
+ r += "" + n;
+ }
+ sb.append(r);
+ i = je + 1;
+ }
+
+ if(i < text.length() && i >= 0) sb.append(text.substring(i));
+
+ return sb.toString();
+ }
+
+ int getFolderCount(File f) {
+ File[] fs = f.listFiles();
+ int c = 0;
+ for (int i = 0; i < fs.length; i++) {
+ if(fs[i].isDirectory()) c++;
+ }
+ return c;
+ }
+
+ int getFileCount(File f) {
+ File[] fs = f.listFiles();
+ int c = 0;
+ for (int i = 0; i < fs.length; i++) {
+ if(fs[i].isFile()) c++;
+ }
+ return c;
+ }
+
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java 2008-03-12 14:56:11 UTC (rev 6894)
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.core.test;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.internal.core.SeamProject;
+import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.xpl.EditorTestHelper;
+import org.osgi.framework.Bundle;
+
+import junit.framework.TestCase;
+
+/**
+ * Test checks that loading Seam model does not depend as N*N on the number of components N.
+ * It works as follows:
+ * 1. Copy project template to workspace and import it.
+ * 2. Create N=1000 java files with seam components in the project and refresh it.
+ * 3. Reload Seam model and compute times T1 and T2 needed
+ * to process first K=200 files and last K=200 files.
+ * 4. Test files if T2 is 3 or more times larger than T1,
+ * which positively implies N*N dependency.
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class SeamBigProjectTest extends TestCase {
+ static String BUNDLE = "org.jboss.tools.seam.core.test";
+ IProject project;
+ TestProjectProvider provider;
+
+ protected void setUp() throws Exception {
+ provider = new TestProjectProvider(BUNDLE,"/projects/SeamWebWarTestProject" , "SeamWebWarTestProject", true);
+ project = provider.getProject();
+ IFolder folder = project.getFolder(new Path("src/action/p"));
+ File template = getTemplateFile();
+ SeamBigProjectGenerator g = new SeamBigProjectGenerator();
+ g.generate(folder, template);
+ EditorTestHelper.joinBackgroundActivities();
+ }
+
+ private File getTemplateFile() {
+ Bundle bundle = Platform.getBundle(BUNDLE);
+ URL url = null;
+ try {
+ url = FileLocator.resolve(bundle.getEntry("/projects/template.txt"));
+ } catch (IOException e) {
+ return null;
+ }
+ String location = url.getFile();
+ return new File(location);
+ }
+
+ public void testBigProject() {
+ ISeamProject sp = getSeamProject();
+ Set<ISeamComponent> cs = sp.getComponents();
+ int components = cs.size();
+ if(components < 500) {
+ fail("Found only " + components + " components. Must be more than 500.");
+ }
+ SeamProject impl = (SeamProject)sp;
+ System.out.println("Full build of " + components + " components completed in " + impl.fullBuildTime + "ms");
+ long time = impl.reload();
+ System.out.println("Reloaded " + sp.getComponents().size() + " components in " + time + "ms");
+ List<Long> statistics = impl.statistics;
+ impl.statistics = null;
+ assertTrue("Statistics contains less than 500 items", statistics.size() >= 500);
+ long t1 = 0, t2 = 0;
+ for (int i = 0; i < 200; i++) {
+ t1 += statistics.get(i);
+ t2 += statistics.get(statistics.size() - 1 - i);
+ }
+ System.out.println("First 200 paths are loaded in " + t1 + "ms");
+ System.out.println("Last 200 paths are loaded in " + t2 + "ms");
+ double d = 1d * t2 / t1;
+ if(d > 2d) {
+ fail("It takes " + d + " times longer to load path in the end "
+ + "of seam model loading than in the beginning.\n"
+ + "That implies that time depends as N*N on the number of components N.");
+ }
+ }
+
+
+ private ISeamProject getSeamProject() {
+ ISeamProject seamProject = null;
+ try {
+ seamProject = (ISeamProject)project.getNature(SeamProject.NATURE_ID);
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot get seam nature.",e);
+ }
+ assertNotNull("Seam project is null", seamProject);
+ return seamProject;
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ ISeamProject sp = getSeamProject();
+ SeamProject impl = (SeamProject)sp;
+ if(impl != null) impl.clearStorage();
+ EditorTestHelper.joinJobs(1000, 10000, 500);
+ provider.dispose();
+ }
+
+}
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2008-03-12 14:55:53 UTC (rev 6893)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2008-03-12 14:56:11 UTC (rev 6894)
@@ -28,6 +28,7 @@
suite.setName("All tests for " + PLUGIN_ID);
suite.addTestSuite(ScannerTest.class);
suite.addTestSuite(SerializationTest.class);
+ suite.addTestSuite(SeamBigProjectTest.class);
suite.addTestSuite(SeamEARTest.class);
suite.addTestSuite(SeamRuntimeListConverterTest.class);
suite.addTestSuite(SeamRuntimeManagerTest.class);
16 years, 3 months
JBoss Tools SVN: r6893 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: internal/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-12 10:55:53 -0400 (Wed, 12 Mar 2008)
New Revision: 6893
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
Log:
JBIDE-1785 Test added
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2008-03-12 14:45:34 UTC (rev 6892)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2008-03-12 14:55:53 UTC (rev 6893)
@@ -82,6 +82,8 @@
return null;
}
+ long begin = System.currentTimeMillis();
+
sp.postponeFiring();
try {
@@ -104,6 +106,8 @@
incrementalBuild(delta, monitor);
}
}
+ long end = System.currentTimeMillis();
+ sp.fullBuildTime += end - begin;
try {
sp.store();
} catch (IOException e) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2008-03-12 14:45:34 UTC (rev 6892)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2008-03-12 14:55:53 UTC (rev 6893)
@@ -402,6 +402,9 @@
}
}
+
+ public long fullBuildTime;
+ public List<Long> statistics;
/**
* Method testing how long it takes to load Seam model
@@ -414,6 +417,7 @@
* @return
*/
public long reload() {
+ statistics = new ArrayList<Long>();
classPath = new ClassPath(this);
sourcePaths.clear();
sourcePaths2.clear();
@@ -589,6 +593,7 @@
context.put(SeamXMLConstants.ATTR_PATH, path);
+ long t1 = System.currentTimeMillis();
LoadedDeclarations ds = new LoadedDeclarations();
Element components = XMLUtilities.getUniqueChild(paths[i], "components");
if(components != null) {
@@ -637,6 +642,10 @@
}
getClassPath().pathLoaded(path);
registerComponents(ds, path);
+ long t2 = System.currentTimeMillis();
+ if(statistics != null) {
+ statistics.add(new Long(t2 - t1));
+ }
}
}
@@ -683,6 +692,11 @@
File file = new File(path.toFile(), "projects/" + project.getName()); //$NON-NLS-1$
return file;
}
+
+ public void clearStorage() {
+ File f = getStorageFile();
+ if(f != null && f.isFile()) f.delete();
+ }
/**
*
16 years, 3 months
JBoss Tools SVN: r6892 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-03-12 10:45:34 -0400 (Wed, 12 Mar 2008)
New Revision: 6892
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1322 Added java package name validation.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2008-03-12 14:35:20 UTC (rev 6891)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2008-03-12 14:45:34 UTC (rev 6892)
@@ -55,12 +55,24 @@
public static String SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_SOURCE_FOLDER_DOES_NOT_EXIST;
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_PACKAGE_IS_NOT_VALID;
+
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_PACKAGE_HAS_WARNING;
+
public static String SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_SOURCE_FOLDER_DOES_NOT_EXIST;
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_PACKAGE_IS_NOT_VALID;
+
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_PACKAGE_HAS_WARNING;
+
public static String SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PROJECT_DOES_NOT_EXIST;
public static String SEAM_SETTINGS_PREFERENCE_PAGE_TEST_SOURCE_FOLDER_DOES_NOT_EXIST;
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PACKAGE_IS_NOT_VALID;
+
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PACKAGE_HAS_WARNING;
+
public static String SEAM_VALIDATOR_CONFIGURATION_BLOCK_ERROR;
public static String SEAM_VALIDATOR_CONFIGURATION_BLOCK_IGNORE;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2008-03-12 14:35:20 UTC (rev 6891)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2008-03-12 14:45:34 UTC (rev 6892)
@@ -91,4 +91,10 @@
SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_SOURCE_FOLDER_DOES_NOT_EXIST=Model source folder "{0}" does not exist.
SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_SOURCE_FOLDER_DOES_NOT_EXIST=Action/Form/Conversation source folder "{0}" does not exist.
SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PROJECT_DOES_NOT_EXIST=Seam test project "{0}" does not exist.
-SEAM_SETTINGS_PREFERENCE_PAGE_TEST_SOURCE_FOLDER_DOES_NOT_EXIST=Test source folder "{0}" does not exist.
\ No newline at end of file
+SEAM_SETTINGS_PREFERENCE_PAGE_TEST_SOURCE_FOLDER_DOES_NOT_EXIST=Test source folder "{0}" does not exist.
+SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_PACKAGE_IS_NOT_VALID=Model package name: {0}
+SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_PACKAGE_HAS_WARNING=Model package name: {0}
+SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_PACKAGE_IS_NOT_VALID=Action/Form/Conversation package name: {0}
+SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_PACKAGE_HAS_WARNING=Action/Form/Conversation package name: {0}
+SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PACKAGE_IS_NOT_VALID=Test package name: {0}
+SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PACKAGE_HAS_WARNING=Test package name: {0}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-03-12 14:35:20 UTC (rev 6891)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-03-12 14:45:34 UTC (rev 6892)
@@ -28,13 +28,16 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.ProfileManager;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -415,8 +418,10 @@
return ISeamFacetDataModelProperties.DEPLOY_AS_WAR;
}
+ private boolean warning;
+
private void validate() {
- boolean warning = false;
+ warning = false;
if(!isSeamSupported()) {
setValid(true);
@@ -426,7 +431,9 @@
}
if(!runtimeIsSelected) {
setMessage(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_SEAM_RUNTIME_IS_NOT_SELECTED, IMessageProvider.WARNING);
- warning = true;
+ setValid(true);
+ setErrorMessage(null);
+ return;
} else {
String value = getValue(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME);
if(SeamRuntimeManager.getInstance().findRuntimeByName(value) == null) {
@@ -437,9 +444,8 @@
}
boolean deployAsEar = ISeamFacetDataModelProperties.DEPLOY_AS_EAR.equals(getValue(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS));
- if(deployAsEar && !validateProjectName(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT)) {
- String ejbProjectName = getValue(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT).trim();
- setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_EJB_PROJECT_DOES_NOT_EXIST, new String[]{ejbProjectName}));
+ if(deployAsEar && !validateProjectName(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_EJB_PROJECT_DOES_NOT_EXIST,
+ ISeamFacetDataModelProperties.SEAM_EJB_PROJECT)) {
return;
}
@@ -453,29 +459,42 @@
}
}
- if(!validateSourceFolder(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME)) {
- String modelSourceFolder = getValue(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER).trim();
- setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_SOURCE_FOLDER_DOES_NOT_EXIST, new String[]{modelSourceFolder}));
+ if(!validateSourceFolder(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_SOURCE_FOLDER_DOES_NOT_EXIST,
+ ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER,
+ ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME)) {
return;
}
+ if(!validateJavaPackageName(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_PACKAGE_IS_NOT_VALID,
+ SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_PACKAGE_HAS_WARNING,
+ ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME)) {
+ return;
+ }
- if(!validateSourceFolder(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME)) {
- String sourceFolder = getValue(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER).trim();
- setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_SOURCE_FOLDER_DOES_NOT_EXIST, new String[]{sourceFolder}));
+ if(!validateSourceFolder(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_SOURCE_FOLDER_DOES_NOT_EXIST,
+ ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER,
+ ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME)) {
return;
}
+ if(!validateJavaPackageName(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_PACKAGE_IS_NOT_VALID,
+ SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_PACKAGE_HAS_WARNING,
+ ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME)) {
+ return;
+ }
if(isTestEnabled()) {
- if(!validateSourceFolder(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER, ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME)){
- String sourceFolder = getValue(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER).trim();
- setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_TEST_SOURCE_FOLDER_DOES_NOT_EXIST, new String[]{sourceFolder}));
+ if(!validateSourceFolder(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_TEST_SOURCE_FOLDER_DOES_NOT_EXIST,
+ ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER,
+ ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME)){
return;
}
- if(!validateProjectName(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT)) {
- String testProjectName = getValue(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT).trim();
- setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PROJECT_DOES_NOT_EXIST, new String[]{testProjectName}));
+ if(!validateProjectName(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PROJECT_DOES_NOT_EXIST, ISeamFacetDataModelProperties.SEAM_TEST_PROJECT)) {
return;
}
+ if(!validateJavaPackageName(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PACKAGE_IS_NOT_VALID,
+ SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PACKAGE_HAS_WARNING,
+ ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME)) {
+ return;
+ }
}
setValid(true);
@@ -485,10 +504,29 @@
}
}
- private boolean validateProjectName(String editorName) {
+ private boolean validateJavaPackageName(String errorMessageKey, String warningMessageKey, String editorName) {
+ if(editorRegistry.get(editorName).isEnabled()) {
+ String packageName = getValue(editorName).trim();
+ IStatus status = JavaConventions.validatePackageName(packageName, CompilerOptions.VERSION_1_5, CompilerOptions.VERSION_1_5);
+ if(status.getSeverity()==IStatus.ERROR) {
+ setErrorMessage(NLS.bind(errorMessageKey, new String[]{status.getMessage()}));
+ setValid(false);
+ return false;
+ }
+ if(status.getSeverity()==IStatus.WARNING) {
+ setMessage(NLS.bind(warningMessageKey, new String[]{status.getMessage()}), IMessageProvider.WARNING);
+ warning = true;
+ return true;
+ }
+ }
+ return true;
+ }
+
+ private boolean validateProjectName(String errorMessageKey, String editorName) {
String projectName = getValue(editorName).trim();
if(projectName.length()>0) {
if(!ResourcesPlugin.getWorkspace().getRoot().getProject(projectName).exists()) {
+ setErrorMessage(NLS.bind(errorMessageKey, new String[]{projectName}));
setValid(false);
return false;
}
@@ -496,12 +534,13 @@
return true;
}
- private boolean validateSourceFolder(String sourceFolderEditorName, String packageEditorName) {
+ private boolean validateSourceFolder(String errorMessageKey, String sourceFolderEditorName, String packageEditorName) {
String sourceFolder = getValue(sourceFolderEditorName).trim();
if(sourceFolder.length()>0) {
IResource folder = ResourcesPlugin.getWorkspace().getRoot().findMember(sourceFolder);
if(folder==null || !(folder instanceof IFolder) || !folder.exists()) {
editorRegistry.get(packageEditorName).setEnabled(false);
+ setErrorMessage(NLS.bind(errorMessageKey, new String[]{sourceFolder}));
setValid(false);
return false;
} else {
16 years, 3 months
JBoss Tools SVN: r6891 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-03-12 10:35:20 -0400 (Wed, 12 Mar 2008)
New Revision: 6891
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1889, fixed, no pseudo content
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java 2008-03-12 13:26:35 UTC (rev 6890)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputTextTemplate.java 2008-03-12 14:35:20 UTC (rev 6891)
@@ -20,6 +20,7 @@
import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMText;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
@@ -122,4 +123,14 @@
return true;
}
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#setPseudoContent(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMNode, org.mozilla.interfaces.nsIDOMDocument)
+ */
+ @Override
+ public void setPseudoContent(VpePageContext pageContext,
+ Node sourceContainer, nsIDOMNode visualContainer,
+ nsIDOMDocument visualDocument) {
+ // Empty
+ }
+
}
16 years, 3 months
JBoss Tools SVN: r6890 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-03-12 09:26:35 -0400 (Wed, 12 Mar 2008)
New Revision: 6890
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/IVpeHelpContextIds.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.doc.user/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1692
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.doc.user/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.doc.user/plugin.xml 2008-03-12 12:49:32 UTC (rev 6889)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.doc.user/plugin.xml 2008-03-12 13:26:35 UTC (rev 6890)
@@ -24,5 +24,9 @@
file="TilesContextHelp.xml"
plugin="org.jboss.tools.jst.web.tiles.ui">
</contexts>
+ <contexts
+ file="VPEContextHelp.xml"
+ plugin="org.jboss.tools.vpe">
+ </contexts>
</extension>
</plugin>
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/IVpeHelpContextIds.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/IVpeHelpContextIds.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/IVpeHelpContextIds.java 2008-03-12 13:26:35 UTC (rev 6890)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe;
+
+public interface IVpeHelpContextIds {
+ public static final String PREFIX = VpePlugin.PLUGIN_ID + '.';
+
+ public static final String VISUAL_PAGE_EDITOR = PREFIX + "visual_page_editor";
+
+ public static final String REFERENCE_TO_RESOURCES = PREFIX + "references_to_resources";
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-03-12 12:49:32 UTC (rev 6889)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-03-12 13:26:35 UTC (rev 6890)
@@ -45,6 +45,7 @@
import org.eclipse.ui.IWorkbenchPartConstants;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.IStatusField;
@@ -57,6 +58,7 @@
import org.jboss.tools.common.model.ui.util.ModelUtilities;
import org.jboss.tools.jst.jsp.editor.IVisualEditor;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
+import org.jboss.tools.vpe.IVpeHelpContextIds;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.mozilla.EditorLoadWindowListener;
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
@@ -411,6 +413,8 @@
controlCount++;
if (controlCount > 1)
return;
+
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IVpeHelpContextIds.VISUAL_PAGE_EDITOR);
// //////////////////////////////////////////////////////////////
Composite cmpEdTl = new Composite(parent, SWT.NONE);
16 years, 3 months
JBoss Tools SVN: r6889 - trunk/common/plugins/org.jboss.tools.common.model/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-12 08:49:32 -0400 (Wed, 12 Mar 2008)
New Revision: 6889
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
Log:
JBIDE-1888
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2008-03-12 12:47:52 UTC (rev 6888)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2008-03-12 12:49:32 UTC (rev 6889)
@@ -82,20 +82,17 @@
FilePROPERTIES_Rename=/model/FilePROPERTIES.html
-FilePROPERTIES_CreateProperty=/model/FilePROPERTIES_CreateProperty.html
-FilePROPERTIES_CreateProperty.WindowTitle=Property
+FilePROPERTIES_Properties.WindowTitle=Properties
+FilePROPERTIES_Properties.Title=File Properties
-FilePROPERTIES_Properties=/model/FileProperty.html
-FilePROPERTIES_Properties.WindowTitle=File Properties
-FilePROPERTIES_Properties.Title=
-
Property=/model/Property.html
-Property_Properties=/model/noHelpYet.html
Property_Properties.WindowTitle=Properties
-Property_Properties.Title=
-Property_Edit=/model/FilePROPERTIES.html
+Property_Properties.Title=Property
+Property_Edit.WindowTitle=Edit
+Property_Edit.Title=Property
+
FilePROPERTIES_CreateProperty.WindowTitle=Add Property
FilePROPERTIES_CreateProperty.Title=Property
16 years, 3 months
JBoss Tools SVN: r6888 - in trunk: struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-03-12 08:47:52 -0400 (Wed, 12 Mar 2008)
New Revision: 6888
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.doc.user/StrutsContextHelp.xml
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/IStrutsHelpContextIds.java
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/ValidationCompoundEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1692
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.doc.user/StrutsContextHelp.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.doc.user/StrutsContextHelp.xml 2008-03-12 12:33:14 UTC (rev 6887)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.doc.user/StrutsContextHelp.xml 2008-03-12 12:47:52 UTC (rev 6888)
@@ -21,10 +21,6 @@
<description>Add Struts Support Wizard</description>
<topic href="JSFStrutsTools.html#AddingStrutsCapabilityToAnExistingWebApplication532" label="Adding Struts Capability to an Existing Web Application"/>
</context>
- <context id="tiles_editor" title="Tiles Editor">
- <description>Tiles Editor</description>
- <topic href="JSFStrutsTools.html#GraphicalEditorForTilesFiles132" label="Graphical Editor for Tiles Files"/>
- </context>
<context id="validation_editor" title="Validation Editor">
<description>Validation Editor</description>
<topic href="JSFStrutsTools.html#GraphicalEditorForStrutsValidationFiles86" label="Graphical Editor for Struts Validation Files"/>
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/IStrutsHelpContextIds.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/IStrutsHelpContextIds.java 2008-03-12 12:33:14 UTC (rev 6887)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/IStrutsHelpContextIds.java 2008-03-12 12:47:52 UTC (rev 6888)
@@ -14,6 +14,8 @@
public static final String PREFIX = StrutsUIPlugin.PLUGIN_ID + '.';
public static final String STRUTS_CONFIG_EDITOR = PREFIX + "struts_config_editor";
+
+ public static final String VALIDATION_EDITOR = PREFIX + "validation_editor";
}
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/ValidationCompoundEditor.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/ValidationCompoundEditor.java 2008-03-12 12:33:14 UTC (rev 6887)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/ValidationCompoundEditor.java 2008-03-12 12:47:52 UTC (rev 6888)
@@ -11,12 +11,15 @@
package org.jboss.tools.struts.validator.ui;
import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.editor.AbstractSelectionProvider;
import org.jboss.tools.common.editor.ObjectMultiPageEditor;
import org.jboss.tools.common.editor.ObjectTextEditor;
import org.jboss.tools.common.editor.TreeGuiEditor;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ui.texteditors.XMLTextEditorComponent;
+import org.jboss.tools.struts.ui.IStrutsHelpContextIds;
import org.jboss.tools.struts.validator.ui.constants.ConstantsEditor;
import org.jboss.tools.struts.validator.ui.formset.FormsetsEditor;
import org.jboss.tools.struts.validator.ui.global.ValidatorsEditor;
@@ -27,7 +30,12 @@
protected FormsetsEditor formsetsEditor;
protected ValidatorsEditor validatorsEditor;
protected ConstantsEditor constantsEditor;
-
+
+ protected Composite createPageContainer(Composite parent) {
+ Composite composite = super.createPageContainer(parent);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IStrutsHelpContextIds.VALIDATION_EDITOR);
+ return composite;
+ }
public void dispose() {
try {
getSite().setSelectionProvider(null);
16 years, 3 months