JBoss Tools SVN: r6142 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-02-07 01:15:54 -0500 (Thu, 07 Feb 2008)
New Revision: 6142
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
Log:
fix compilation error
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2008-02-07 03:55:39 UTC (rev 6141)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2008-02-07 06:15:54 UTC (rev 6142)
@@ -3,6 +3,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.common.log.BaseUIPlugin;
+import org.jboss.tools.common.log.IPluginLog;
import org.osgi.framework.BundleContext;
/**
@@ -64,4 +65,8 @@
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
+
+ public static IPluginLog getPluginLog() {
+ return getDefault();
+ }
}
16 years, 4 months
JBoss Tools SVN: r6141 - trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-02-06 22:55:39 -0500 (Wed, 06 Feb 2008)
New Revision: 6141
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java
Log:
rollback code for waitForJobs method
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java 2008-02-07 02:12:11 UTC (rev 6140)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java 2008-02-07 03:55:39 UTC (rev 6141)
@@ -93,7 +93,7 @@
if (!display.readAndDispatch())
display.sleep();
}
- display.update();
+ //display.update();
}
// Otherwise, perform a simple sleep.
@@ -110,8 +110,8 @@
* Wait until all background tasks are complete.
*/
public void waitForJobs() {
- while (noMoreJobs())
- delay(1000);
+ while (Platform.getJobManager().currentJob() != null)
+ delay(2000);
}
public boolean noMoreJobs() {
16 years, 4 months
JBoss Tools SVN: r6140 - in trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner: view and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-02-06 21:12:11 -0500 (Wed, 06 Feb 2008)
New Revision: 6140
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java
Log:
Run test only for xulRunner view with about:blank to understand is it started at all? Since it looks like all errors in VPE tests related to XHTML. Now html and struts tests run without errors, but they have html and jsp files.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java 2008-02-07 01:13:52 UTC (rev 6139)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java 2008-02-07 02:12:11 UTC (rev 6140)
@@ -18,7 +18,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("Test for " + XulRunnerAllTests.class.getName());
//add test cases for dom elements
- suite.addTestSuite(DOMCreatingTest.class);
+ suite.addTestSuite(XulRunnerBrowserTest.class);
return suite;
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java 2008-02-07 01:13:52 UTC (rev 6139)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java 2008-02-07 02:12:11 UTC (rev 6140)
@@ -1,15 +1,17 @@
package org.jboss.tools.vpe.xulrunner.view;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
+import org.jboss.tools.vpe.xulrunner.BrowserPlugin;
import org.jboss.tools.vpe.xulrunner.XulRunnerException;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
public class XulRunnerView extends ViewPart {
- private static final String INIT_URL = "about:buildconfig";
+ private static final String INIT_URL = "about:blank";
private XulRunnerEditor xulrunnerEditor;
@Override
@@ -20,7 +22,7 @@
xulrunnerEditor.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, true));
} catch (XulRunnerException e) {
- // Ignore exception
+ BrowserPlugin.getPluginLog().logError(e);
}
}
16 years, 4 months
JBoss Tools SVN: r6139 - in trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test: mappingproject and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-02-06 20:13:52 -0500 (Wed, 06 Feb 2008)
New Revision: 6139
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java
Log:
fix for hibernate console tests errors
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java 2008-02-06 22:16:02 UTC (rev 6138)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java 2008-02-07 01:13:52 UTC (rev 6139)
@@ -1,11 +1,14 @@
package org.hibernate.eclipse.console.test;
import java.io.File;
+import java.io.IOException;
import java.net.URL;
import java.util.Properties;
import junit.framework.TestCase;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
import org.hibernate.SessionFactory;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.ConsoleConfigurationListener;
@@ -13,6 +16,7 @@
import org.hibernate.console.KnownConfigurations;
import org.hibernate.console.QueryPage;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
+import org.osgi.framework.Bundle;
import org.w3c.dom.Element;
public class ConsoleConfigurationTest extends TestCase {
@@ -54,7 +58,15 @@
}
public File getConfigXMLFile() {
- return null;
+ File xmlConfig = null;
+ Bundle bundle = HibernateConsoleTestPlugin.getDefault().getBundle();
+ try {
+ URL url = FileLocator.resolve(bundle.getEntry("/res/project/hibernate.cfg.xml"));
+ xmlConfig = new File(url.getFile());
+ } catch (IOException e) {
+ fail("Cannot find /res/project/hibernate.cfg.xml file");
+ }
+ return xmlConfig;
}
public Properties getProperties() {
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java 2008-02-06 22:16:02 UTC (rev 6138)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java 2008-02-07 01:13:52 UTC (rev 6139)
@@ -1,9 +1,13 @@
package org.hibernate.eclipse.console.test;
+import java.util.logging.Logger;
+
import junit.framework.TestCase;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.jobs.IJobManager;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.ui.IPackagesViewPart;
import org.eclipse.jdt.ui.JavaUI;
@@ -106,10 +110,21 @@
* Wait until all background tasks are complete.
*/
public void waitForJobs() {
- while (Platform.getJobManager().currentJob() != null)
+ while (noMoreJobs())
delay(1000);
}
+ public boolean noMoreJobs() {
+ Job[] queuedJobs= Job.getJobManager().find(null);
+ for (int i= 0; i < queuedJobs.length; i++) {
+ Job entry= queuedJobs[i];
+ if (entry.getState() == Job.RUNNING || entry.getState() == Job.WAITING) {
+ return false;
+ }
+ }
+ return true;
+ }
+
protected SimpleTestProject getProject() {
return this.project;
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java 2008-02-06 22:16:02 UTC (rev 6138)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java 2008-02-07 01:13:52 UTC (rev 6139)
@@ -14,6 +14,8 @@
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -27,6 +29,7 @@
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -38,6 +41,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.core.PackageFragmentRoot;
+import org.hibernate.eclipse.console.test.HibernateConsoleTestPlugin;
/**
@@ -109,13 +113,16 @@
project.delete(true, true, null);
}
- private void buildBigTestProject() throws JavaModelException, CoreException {
+ private void buildBigTestProject() throws JavaModelException, CoreException, IOException {
project = buildNewProject(PROJECT_NAME);
javaProject = buildJavaProject(project);
-
IPath resourcePath = new Path(RESOURCE_PATH);
File resourceFolder = resourcePath.toFile();
+ URL entry = HibernateConsoleTestPlugin.getDefault().getBundle().getEntry(RESOURCE_PATH);
+ URL resProject = FileLocator.resolve(entry);
+ String tplPrjLcStr= FileLocator.resolve(resProject).getFile();
+ resourceFolder = new File(tplPrjLcStr);
if (!resourceFolder.exists())
throw new RuntimeException("Folder " + RESOURCE_PATH + " not found!");
@@ -340,7 +347,7 @@
StringWriter writer = new StringWriter();
int bytes_read;
while ((bytes_read = reader.read(buffer)) != -1)
- {
+ {resourceFolder.exists()
writer.write(buffer, 0, bytes_read);
}
return (writer.toString());
16 years, 4 months
JBoss Tools SVN: r6138 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-02-06 17:16:02 -0500 (Wed, 06 Feb 2008)
New Revision: 6138
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
fix testJiraJbide1631 error: Failure Marker matches the '"foo1" cannot be resolved' pattern wasn't found
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2008-02-06 22:00:44 UTC (rev 6137)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2008-02-06 22:16:02 UTC (rev 6138)
@@ -76,6 +76,13 @@
return seamProject;
}
+ public void testJiraJbide1631() throws CoreException {
+ // Test for http://jira.jboss.com/jira/browse/JBIDE-1631
+ IFile jbide1631XHTMLFile = project.getFile("WebContent/JBIDE-1631.xhtml");
+ assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo1\" cannot be resolved", 16 );
+ assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo2\" cannot be resolved", 17 );
+ }
+
public void testComponentsValidator() {
ISeamProject seamProject = getSeamProject(project);
@@ -743,13 +750,6 @@
assertTrue("Problem marker has wrong line number", lineNumbers[0] == 22);
}
- public void testJiraJbide1631() throws CoreException {
- // Test for http://jira.jboss.com/jira/browse/JBIDE-1631
- IFile jbide1631XHTMLFile = project.getFile("WebContent/JBIDE-1631.xhtml");
- assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo1\" cannot be resolved", 16 );
- assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo2\" cannot be resolved", 17 );
- }
-
public void testInheritedMethods() {
ISeamProject seamProject = getSeamProject(project);
16 years, 4 months
JBoss Tools SVN: r6137 - trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-02-06 17:00:44 -0500 (Wed, 06 Feb 2008)
New Revision: 6137
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
Log:
fix errors in testActionHandlers JUnit test
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2008-02-06 19:30:04 UTC (rev 6136)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2008-02-06 22:00:44 UTC (rev 6137)
@@ -1063,16 +1063,7 @@
<Editor name="Uneditable"/>
</XModelAttribute>
</XModelAttributes>
- <XActionItem kind="list">
- <XActionItem
- HandlerClassName="org.jboss.tools.struts.webprj.model.handlers.SetLocationHandler"
- ICON="action.webprj.set_location" WizardClassName="%Default%"
- displayName="Set location..." kind="action" name="SetLocation">
- <EntityData EntityName="WebPrjCreateStepDirs">
- <AttributeData AttributeName="location" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
+ <XActionItem kind="list"/>
<XDependencies/>
</XModelEntity>
<XModelEntity name="WebPrjRegisterApplication">
@@ -1543,23 +1534,6 @@
HandlerClassName="org.jboss.tools.jst.web.project.handlers.CreateWebPrjHandler"
ICON="main.projects.new" SAVE_REQUIRED="yes"
displayName="Create New Project..." kind="action" name="CreateStrutsProject"/>
- <XActionItem HIDE="always"
- HandlerClassName="org.jboss.tools.struts.webprj.model.handlers.ImportWebPrjHandler"
- ICON="main.projects.item"
- PROPERTIES="support=org.jboss.tools.struts.webprj.model.handlers.ImportWebPrjSupport"
- SAVE_REQUIRED="yes" displayName="Adopt Existing Project..."
- kind="action" name="ImportStrutsProject">
- <EntityData EntityName="WebPrjCreateStepName">
- <AttributeData AttributeName="name"/>
- <AttributeData AttributeName="location"/>
- </EntityData>
- <EntityData EntityName="WebPrjCreateStepDirs">
- <AttributeData AttributeName="webroot"/>
- <AttributeData AttributeName="classes" Mandatory="no"/>
- <AttributeData AttributeName="lib" Mandatory="no"/>
- <AttributeData AttributeName="src" Mandatory="no"/>
- </EntityData>
- </XActionItem>
<XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
PROPERTIES="support=org.jboss.tools.struts.webprj.model.helpers.sync.SyncProjectSupport"
displayName="Modules Configuration" kind="action" name="SynchronizeModules"/>
16 years, 4 months
JBoss Tools SVN: r6136 - branches.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2008-02-06 14:30:04 -0500 (Wed, 06 Feb 2008)
New Revision: 6136
Added:
branches/jbosstools-2.0.x/
Log:
creating 2.0.1 branch
Copied: branches/jbosstools-2.0.x (from rev 6135, trunk)
16 years, 4 months
JBoss Tools SVN: r6135 - in trunk/common/plugins/org.jboss.tools.common.text.ext: src/org/jboss/tools/common/text/ext/hyperlink/xml and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-02-06 12:26:57 -0500 (Wed, 06 Feb 2008)
New Revision: 6135
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLXmlNsHyperlink.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1741 OpenOn doesn't work for xsi:schemaLocation in web.xml
Issue is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF 2008-02-06 17:26:43 UTC (rev 6134)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF 2008-02-06 17:26:57 UTC (rev 6135)
@@ -38,5 +38,6 @@
org.eclipse.jst.jsp.core;visibility:=reexport,
org.eclipse.jst.j2ee.web;visibility:=reexport,
org.eclipse.wst.common.modulecore;visibility:=reexport,
- org.eclipse.emf.ecore
+ org.eclipse.emf.ecore,
+ org.eclipse.pde.ui
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLXmlNsHyperlink.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLXmlNsHyperlink.java 2008-02-06 17:26:43 UTC (rev 6134)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xml/XMLXmlNsHyperlink.java 2008-02-06 17:26:57 UTC (rev 6135)
@@ -12,18 +12,20 @@
import java.io.File;
import java.io.FileInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
+import java.util.zip.ZipFile;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.jdt.internal.core.JarEntryFile;
-import org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.IRegion;
+import org.eclipse.pde.internal.ui.editor.JarEntryEditorInput;
+import org.eclipse.pde.internal.ui.editor.JarEntryFile;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPersistableElement;
@@ -137,14 +139,18 @@
try {
// IFile f = getFileFromCatalog(getURI(region));
// IFile f = getFileFromCatalog(getPublicId(region), getSystemId(region));
-
- String filename = getFilenameFromCatalog(getPublicId(region), getSystemId(region));
+
+ String mappedSystemId = getMappedSystemIdFromCatalog(getPublicId(region), getSystemId(region));
+ String filename = getFilenameFromMappedSystemId(mappedSystemId);
IEditorPart part = null;
if (filename != null) {
// openFileInEditor(filename);
part = openExternalFile(filename);
- }
- if (part == null)
+ if (part == null)
+ openFileFailed();
+ } else if (mappedSystemId != null) {
+ openFileInEditor(mappedSystemId);
+ } else
openFileFailed();
} catch (Exception x) {
@@ -178,6 +184,7 @@
}
protected final String JAR_FILE_PROTOCOL = "jar:file:/";//$NON-NLS-1$
+ protected final String JAR_FILE = "jar:file:";//$NON-NLS-1$
/* (non-Javadoc)
* @see com.ibm.sse.editor.hyperlink.AbstractHyperlink#openFileInEditor(java.lang.String)
@@ -189,6 +196,11 @@
IEditorInput jarEditorInput = createEditorInput(fileString);
IEditorPart part = openFileInEditor(jarEditorInput, fileString);
if (part == null) openFileFailed();
+ } else if (fileString.startsWith(JAR_FILE)) {
+ fileString = fileString.substring(JAR_FILE.length());
+ IEditorInput jarEditorInput = createEditorInputAlternate(fileString);
+ IEditorPart part = openFileInEditor(jarEditorInput, fileString);
+ if (part == null) openFileFailed();
} else {
super.openFileInEditor(fileString);
}
@@ -196,7 +208,28 @@
openFileFailed();
}
}
-
+
+ protected IEditorInput createEditorInputAlternate(String fileString) {
+ String jarName = fileString.substring(0,fileString.indexOf("!"));
+ String entryName = fileString.substring(fileString.indexOf("!")+2,fileString.length());
+
+ ZipFile jarFile = null;
+ try {
+ jarFile = new ZipFile(jarName);
+ } catch (IOException e) {
+ return null;
+ }
+ JarEntryFile jarEntryFile = new JarEntryFile(jarFile, entryName);
+
+ JarEntryEditorInput jarEditorInput = new JarEntryEditorInput(jarEntryFile) {
+ public boolean equals(Object arg) {
+ try {return this.toString().equals(arg.toString());}
+ catch (Exception x) {return false;}
+ }
+ };
+ return jarEditorInput;
+ }
+
String getURI(IRegion region) {
try {
return Utils.trimQuotes(getDocument().get(region.getOffset(), region.getLength()));
@@ -234,40 +267,36 @@
}
}
- private String getFilenameFromCatalog(String publicId, String systemId) {
-// IStructuredModel model = null;
-
+ private String getMappedSystemIdFromCatalog(String publicId, String systemId) {
+ String mappedSystemId = null;
try {
- String mappedSystemId = null;
-
if (publicId != null)
mappedSystemId = XMLCorePlugin.getDefault().getDefaultXMLCatalog().resolvePublic(publicId, systemId);
if (mappedSystemId == null)
mappedSystemId = XMLCorePlugin.getDefault().getDefaultXMLCatalog().resolveSystem(systemId);
- if(mappedSystemId == null) return null;
-
- String fileName = null;
-
+ if (systemId != null)
+ mappedSystemId = XMLCorePlugin.getDefault().getDefaultXMLCatalog().resolveURI(systemId);
+ } catch (Exception e) {
+ // Ignore, just return null as result
+ }
+ return mappedSystemId;
+ }
+
+ private String getFilenameFromMappedSystemId(String mappedSystemId) {
+ String fileName = null;
+ try {
if(mappedSystemId!=null) {
- try {
- File file = new File(new URL(mappedSystemId).getFile());
- if(file.isFile()) {
- fileName = file.getAbsolutePath();
- }
- } catch(Exception e) {
-// ExtensionsPlugin.log(e);
+ File file = new File(new URL(mappedSystemId).getFile());
+ if(file.isFile()) {
+ fileName = file.getAbsolutePath();
}
}
-
- return fileName;
} catch (Exception x) {
//ignore
- return null;
- } finally {
}
+ return fileName;
}
-
/**
* @seecom.ibm.sse.editor.AbstractHyperlink#doGetHyperlinkRegion(int)
*/
@@ -328,5 +357,4 @@
}
}
-
}
16 years, 4 months
JBoss Tools SVN: r6134 - trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-02-06 12:26:43 -0500 (Wed, 06 Feb 2008)
New Revision: 6134
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
Log:
http://jira.jboss.org/jira/browse/JBIDE-1741 OpenOn doesn't work for xsi:schemaLocation in web.xml
Issue is fixed
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2008-02-06 16:10:37 UTC (rev 6133)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2008-02-06 17:26:43 UTC (rev 6134)
@@ -130,6 +130,16 @@
</hyperlinkPartitioner>
<hyperlinkPartitioner
+ class="org.jboss.tools.common.text.ext.hyperlink.xml.XMLXmlNsHyperlinkPartitioner"
+ id="org.jboss.tools.common.text.ext.hyperlink.xml.XMLXmlNsHyperlinkPartitioner">
+ <contentType id="org.eclipse.jst.jsf.facesconfig.facesConfigFile">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ </partitionType>
+ </contentType>
+ </hyperlinkPartitioner>
+
+
+ <hyperlinkPartitioner
id="org.jboss.tools.common.text.ext.jsf.hyperlink.JSFXMLContextParamLinkHyperlinkPartitioner"
class="org.jboss.tools.jsf.text.ext.hyperlink.JSFXMLContextParamLinkHyperlinkPartitioner">
<contentType id="org.eclipse.wst.xml.core.xmlsource">
16 years, 4 months
JBoss Tools SVN: r6133 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-02-06 11:10:37 -0500 (Wed, 06 Feb 2008)
New Revision: 6133
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibconfig3.meta
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibernate3.meta
Log:
JBIDE-1751
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibconfig3.meta
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibconfig3.meta 2008-02-06 15:30:11 UTC (rev 6132)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibconfig3.meta 2008-02-06 16:10:37 UTC (rev 6133)
@@ -77,7 +77,7 @@
AdoptManagerClass="org.jboss.tools.hibernate.xml.model.handlers.FolderOwnerAdopt"
ImplementationLoadingClass="org.jboss.tools.hibernate.xml.model.HibConfigLoader"
ImplementingClass="org.jboss.tools.hibernate.xml.model.impl.FileHibernateImpl"
- ObjectEditorClass="%XML%"
+ ObjectEditorClass="org.jboss.tools.hibernate.ui.xml.editor.HibConfig3CompoundEditor"
PROPERTIES="loaderKind=file;formFactory=%Default%;formLayout=org.jboss.tools.hibernate.ui.xml.form.Hibernate3FormLayoutData"
XMLSUBPATH="hibernate-configuration" name="FileHibConfig3">
<XChildrenEntities>
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibernate3.meta
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibernate3.meta 2008-02-06 15:30:11 UTC (rev 6132)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibernate3.meta 2008-02-06 16:10:37 UTC (rev 6133)
@@ -108,7 +108,7 @@
AdoptManagerClass="org.jboss.tools.hibernate.xml.model.handlers.FolderOwnerAdopt"
ImplementationLoadingClass="org.jboss.tools.hibernate.xml.model.HibernateLoader"
ImplementingClass="org.jboss.tools.hibernate.xml.model.impl.FileHibernateImpl"
- ObjectEditorClass="%XML%"
+ ObjectEditorClass="org.jboss.tools.hibernate.ui.xml.editor.Hibernate3CompoundEditor"
PROPERTIES="loaderKind=file;formFactory=%Default%;formLayout=org.jboss.tools.hibernate.ui.xml.form.Hibernate3FormLayoutData"
XMLSUBPATH="hibernate-mapping" name="FileHibernate3">
<XChildrenEntities>
16 years, 4 months