JBoss Tools SVN: r18788 - in trunk/hibernatetools/plugins: org.hibernate.eclipse/src/org/hibernate/console/execution and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-11-23 12:21:03 -0500 (Mon, 23 Nov 2009)
New Revision: 18788
Removed:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigUnloadJarChange.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/DeleteResourceParticipant.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/DefaultExecutionContext.java
Log:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-936 - revert changes back, could be unsafe for core part, cause it change classpath order, should be released in a better manner
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2009-11-23 17:03:30 UTC (rev 18787)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2009-11-23 17:21:03 UTC (rev 18788)
@@ -30,15 +30,12 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.ArrayList;
-import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -47,11 +44,8 @@
import org.dom4j.DocumentException;
import org.dom4j.Node;
import org.dom4j.io.DOMWriter;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.ProfileManager;
-import org.eclipse.jdt.apt.core.internal.JarClassLoader;
import org.eclipse.osgi.util.NLS;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
@@ -77,11 +71,9 @@
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
-@SuppressWarnings("restriction")
public class ConsoleConfiguration implements ExecutionContextHolder {
private ExecutionContext executionContext;
- private ClassLoader classLoader = null;
private Map<String, FakeDelegatingDriver> fakeDrivers = new HashMap<String, FakeDelegatingDriver>();
@@ -114,20 +106,8 @@
// reseting state
configuration = null;
closeSessionFactory();
- cleanUpClassLoader();
}
- public void cleanUpClassLoader() {
- ClassLoader classLoaderTmp = classLoader;
- while (classLoaderTmp != null) {
- if (classLoaderTmp instanceof JarClassLoader) {
- ((JarClassLoader)classLoaderTmp).close();
- }
- classLoaderTmp = classLoaderTmp.getParent();
- }
- classLoader = null;
- }
-
public void build() {
configuration = buildWith(null, true);
fireConfigurationBuilt();
@@ -257,102 +237,39 @@
}
return customClassPathURLs;
}
-
- public URL[] getCustomClassPathURLs_Jars() {
- URL[] classPathURLs = getCustomClassPathURLs();
- ArrayList<URL> res = new ArrayList<URL>();
- for (int i = 0; i < classPathURLs.length; i++) {
- String fileName = classPathURLs[i].getFile();
- fileName = fileName.toLowerCase();
- if (fileName.endsWith(".jar")) { //$NON-NLS-1$
- res.add(classPathURLs[i]);
- }
- }
- return res.toArray(new URL[0]);
- }
-
- protected URL[] getCustomClassPathURLs_NotJars() {
- URL[] classPathURLs = getCustomClassPathURLs();
- ArrayList<URL> res = new ArrayList<URL>();
- for (int i = 0; i < classPathURLs.length; i++) {
- String fileName = classPathURLs[i].getFile();
- fileName = fileName.toLowerCase();
- if (!fileName.endsWith(".jar")) { //$NON-NLS-1$
- res.add(classPathURLs[i]);
- }
- }
- return res.toArray(new URL[0]);
- }
-
- protected ClassLoader createJarClassLoader() {
- URL[] customClassPathURLs_Jars = getCustomClassPathURLs_Jars();
- List<File> filesTmp = new ArrayList<File>();
- for (int i = 0; i < customClassPathURLs_Jars.length; i++) {
- String filePath = customClassPathURLs_Jars[i].getPath();
- IPath resourcePath = new Path(filePath);
- File resourceFile = resourcePath.toFile();
- //if (resourceFile.exists()) {
- filesTmp.add(resourceFile);
- //}
- }
- final List<File> files = filesTmp;
- JarClassLoader jarClassLoader = AccessController.doPrivileged(new PrivilegedAction<JarClassLoader>() {
- public JarClassLoader run() {
- return new JarClassLoader(files, getParentClassLoader()) {
- @Override
- public Enumeration<URL> getResources(String name) throws IOException {
- return null;
- }
- };
- }
- });
- return jarClassLoader;
- }
-
- protected ClassLoader createURLClassLoader() {
- final URL[] customClassPathURLs = getCustomClassPathURLs_NotJars();
- URLClassLoader urlClassLoader = AccessController.doPrivileged(new PrivilegedAction<URLClassLoader>() {
- public URLClassLoader run() {
- return new URLClassLoader(customClassPathURLs, createJarClassLoader()) {
- protected Class<?> findClass(String name) throws ClassNotFoundException {
- try {
- return super.findClass(name);
- } catch (ClassNotFoundException cnfe) {
- throw cnfe;
- }
- }
-
- protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
- try {
- return super.loadClass(name, resolve);
- } catch (ClassNotFoundException cnfe) {
- throw cnfe;
- }
- }
-
- public Class<?> loadClass(String name) throws ClassNotFoundException {
- try {
- return super.loadClass(name);
- } catch (ClassNotFoundException cnfe) {
- throw cnfe;
- }
- }
- };
- }
- });
- return urlClassLoader;
- }
/**
* @return
*
*/
public Configuration buildWith(final Configuration cfg, final boolean includeMappings) {
- if (classLoader == null) {
- classLoader = createURLClassLoader();
- }
- executionContext = new DefaultExecutionContext(getName(), classLoader);
+ URL[] customClassPathURLs = getCustomClassPathURLs();
+ executionContext = new DefaultExecutionContext( getName(), new URLClassLoader( customClassPathURLs, getParentClassLoader() ) {
+ protected Class<?> findClass(String name) throws ClassNotFoundException {
+ try {
+ return super.findClass( name );
+ } catch(ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+ protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ try {
+ return super.loadClass( name, resolve );
+ } catch(ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+
+ public Class<?> loadClass(String name) throws ClassNotFoundException {
+ try {
+ return super.loadClass( name );
+ } catch(ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+ });
+
Configuration result = (Configuration) executionContext.execute(new ExecutionContext.Command() {
public Object execute() {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/DefaultExecutionContext.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/DefaultExecutionContext.java 2009-11-23 17:03:30 UTC (rev 18787)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/execution/DefaultExecutionContext.java 2009-11-23 17:21:03 UTC (rev 18788)
@@ -21,6 +21,7 @@
*/
package org.hibernate.console.execution;
+import java.net.URLClassLoader;
import java.util.Map;
import java.util.WeakHashMap;
@@ -30,13 +31,13 @@
public class DefaultExecutionContext implements ExecutionContext {
- final private ClassLoader configurationClassLoader;
+ final private URLClassLoader configurationClassLoader;
private volatile int installs;
private Map<Thread, ClassLoader> previousLoaders = new WeakHashMap<Thread, ClassLoader>();
final String key;
- public DefaultExecutionContext(String key, ClassLoader loader) {
+ public DefaultExecutionContext(String key, URLClassLoader loader) {
configurationClassLoader = loader;
this.key = key;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2009-11-23 17:03:30 UTC (rev 18787)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2009-11-23 17:21:03 UTC (rev 18788)
@@ -640,19 +640,6 @@
label="hql editor colors coloring highlighting query"/>
</extension>
<extension
- point="org.eclipse.ltk.core.refactoring.deleteParticipants">
- <deleteParticipant
- class="org.hibernate.eclipse.launch.core.refactoring.DeleteResourceParticipant"
- id="org.hibernate.eclipse.launch.core.refactoring.DeleteResourceParticipant"
- name="Console Configuration Resource Delete Participant">
- <enablement>
- <with variable="element">
- <instanceof value="org.eclipse.core.resources.IResource"/>
- </with>
- </enablement>
- </deleteParticipant>
- </extension>
- <extension
point="org.eclipse.ltk.core.refactoring.renameParticipants">
<renameParticipant
class="org.hibernate.eclipse.launch.core.refactoring.ConsoleConfigurationITypeRenameParticipant"
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigUnloadJarChange.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigUnloadJarChange.java 2009-11-23 17:03:30 UTC (rev 18787)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/ConsoleConfigUnloadJarChange.java 2009-11-23 17:21:03 UTC (rev 18788)
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.hibernate.eclipse.launch.core.refactoring;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.hibernate.console.ConsoleConfiguration;
-
-/**
- * @author Vitali Yemialyanchyk
- */
-public class ConsoleConfigUnloadJarChange extends Change {
-
- protected ConsoleConfiguration config;
-
- public ConsoleConfigUnloadJarChange(ConsoleConfiguration config) {
- this.config = config;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.Change#getModifiedElement()
- */
- @Override
- public Object getModifiedElement() {
- return config;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.Change#getName()
- */
- @Override
- public String getName() {
- return config.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.Change#initializeValidationData(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void initializeValidationData(IProgressMonitor pm) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.Change#isValid(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException,
- OperationCanceledException {
- return new RefactoringStatus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.Change#perform(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public Change perform(IProgressMonitor pm) throws CoreException {
- config.cleanUpClassLoader();
- return null;
- }
-
-}
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/DeleteResourceParticipant.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/DeleteResourceParticipant.java 2009-11-23 17:03:30 UTC (rev 18787)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/DeleteResourceParticipant.java 2009-11-23 17:21:03 UTC (rev 18788)
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.hibernate.eclipse.launch.core.refactoring;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.DeleteParticipant;
-import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.console.KnownConfigurations;
-import org.hibernate.eclipse.console.HibernateConsoleMessages;
-
-/**
- * @author Vitali Yemialyanchyk
- */
-public class DeleteResourceParticipant extends DeleteParticipant {
-
- private String path2Del = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#checkConditions(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
- */
- @Override
- public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context)
- throws OperationCanceledException {
- return new RefactoringStatus();
- }
-
- @Override
- public Change createPreChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- if (path2Del == null) {
- return null;
- }
- List<Change> changes = new ArrayList<Change>();
- ConsoleConfiguration[] configs = KnownConfigurations.getInstance().getConfigurations();
- for (int i = 0; i < configs.length; i++) {
- final ConsoleConfiguration config = configs[i];
- final URL[] classPathURLs_Jars = config.getCustomClassPathURLs_Jars();
- for (int j = 0; j < classPathURLs_Jars.length; j++) {
- String path2Jar = classPathURLs_Jars[i].getPath();
- if (path2Jar.startsWith(path2Del)) {
- changes.add(new ConsoleConfigUnloadJarChange(config));
- break;
- }
- }
- }
- return HibernateRefactoringUtil.createChangesFromList(changes, getName());
- }
-
- @Override
- public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
- */
- @Override
- public String getName() {
- return HibernateConsoleMessages.DeleteResourceParticipant_hibernate_configurations_updates;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- @Override
- protected boolean initialize(Object element) {
- boolean res = false;
- IResource res2Del = (IResource)element;
- String path2Del = res2Del.getLocationURI().getPath();
- ConsoleConfiguration[] configs = KnownConfigurations.getInstance().getConfigurations();
- for (int i = 0; i < configs.length; i++) {
- final ConsoleConfiguration config = configs[i];
- final URL[] classPathURLs_Jars = config.getCustomClassPathURLs_Jars();
- for (int j = 0; j < classPathURLs_Jars.length; j++) {
- String path2Jar = classPathURLs_Jars[i].getPath();
- if (path2Jar.startsWith(path2Del)) {
- res = true;
- }
- }
- }
- this.path2Del = res ? path2Del : null;
- return res;
- }
-
-}
15 years, 1 month
JBoss Tools SVN: r18787 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-11-23 12:03:30 -0500 (Mon, 23 Nov 2009)
New Revision: 18787
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBoss4xEarFacetInstallListener.java
Log:
JBIDE-5242 - fix npe for null runtime case
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBoss4xEarFacetInstallListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBoss4xEarFacetInstallListener.java 2009-11-23 16:34:27 UTC (rev 18786)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBoss4xEarFacetInstallListener.java 2009-11-23 17:03:30 UTC (rev 18787)
@@ -54,21 +54,23 @@
IProjectFacetActionEvent e = (IProjectFacetActionEvent)event;
IProjectFacet pf = e.getProjectFacet();
if( pf.getId().equals(IWTPConstants.FACET_EAR)) {
- String rtName = e.getProject().getPrimaryRuntime().getName();
- IRuntime rt = ServerCore.findRuntime(rtName);
- if( rt != null ) {
- String type = rt.getRuntimeType().getId();
- if( type.equals(AS_42) || type.equals(EAP_43)) {
- // Launch the op to create the ear application.xml file
- IVirtualComponent vc = ComponentCore.createComponent(e.getProject().getProject());
- IDataModel model = DataModelFactory.createDataModel(new EarCreateDeploymentFilesDataModelProvider());
- model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD, vc);
- model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, e.getProject().getProject());
- IDataModelOperation op = model.getDefaultOperation();
- try {
- op.execute(new NullProgressMonitor(), null);
- } catch (ExecutionException e1) {
- // Ignore
+ if( e.getProject().getPrimaryRuntime() != null ) {
+ String rtName = e.getProject().getPrimaryRuntime().getName();
+ IRuntime rt = ServerCore.findRuntime(rtName);
+ if( rt != null ) {
+ String type = rt.getRuntimeType().getId();
+ if( type.equals(AS_42) || type.equals(EAP_43)) {
+ // Launch the op to create the ear application.xml file
+ IVirtualComponent vc = ComponentCore.createComponent(e.getProject().getProject());
+ IDataModel model = DataModelFactory.createDataModel(new EarCreateDeploymentFilesDataModelProvider());
+ model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD, vc);
+ model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, e.getProject().getProject());
+ IDataModelOperation op = model.getDefaultOperation();
+ try {
+ op.execute(new NullProgressMonitor(), null);
+ } catch (ExecutionException e1) {
+ // Ignore
+ }
}
}
}
15 years, 1 month
JBoss Tools SVN: r18786 - trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-11-23 11:34:27 -0500 (Mon, 23 Nov 2009)
New Revision: 18786
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBResourceTree.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5191
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBResourceTree.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBResourceTree.java 2009-11-23 16:09:35 UTC (rev 18785)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/ESBResourceTree.java 2009-11-23 16:34:27 UTC (rev 18786)
@@ -3,15 +3,26 @@
import java.util.ArrayList;
import java.util.List;
+import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.XModelObjectConstants;
import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.filesystems.XFileObject;
+import org.jboss.tools.common.model.filesystems.impl.FileSystemsImpl;
import org.jboss.tools.common.model.impl.trees.FileSystemResourceTree;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
public class ESBResourceTree extends FileSystemResourceTree {
+ public void setModel(XModel model) {
+ super.setModel(model);
+ if(EclipseResourceUtil.isProjectFragment(model)) {
+ FileSystemsImpl fs = (FileSystemsImpl)FileSystemsHelper.getFileSystems(model);
+ if(fs != null) fs.forceUpdate();
+ }
+ }
+
public XModelObject[] getChildren(XModelObject object) {
if(object == getRoot()) {
XModelObject[] os = object.getChildren();
15 years, 1 month
JBoss Tools SVN: r18785 - workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-11-23 11:09:35 -0500 (Mon, 23 Nov 2009)
New Revision: 18785
Added:
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libfreebl3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libjavaxpcomglue.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnspr4.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnss3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnssckbi.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnssdbm3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnssutil3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libplc4.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libplds4.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libsmime3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libsoftokn3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libsqlite3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libssl3.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libxpcom.so
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libxul.so
Log:
other missed libraries has been commited
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libfreebl3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libfreebl3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libjavaxpcomglue.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libjavaxpcomglue.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnspr4.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnspr4.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnss3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnss3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnssckbi.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnssckbi.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnssdbm3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnssdbm3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnssutil3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libnssutil3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libplc4.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libplc4.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libplds4.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libplds4.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libsmime3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libsmime3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libsoftokn3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libsoftokn3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libsqlite3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libsqlite3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libssl3.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libssl3.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libxpcom.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libxpcom.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libxul.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libxul.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
15 years, 1 month
JBoss Tools SVN: r18784 - workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-11-23 11:03:17 -0500 (Mon, 23 Nov 2009)
New Revision: 18784
Added:
workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libmozjs.so
Log:
Missied library has been added
Added: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libmozjs.so
===================================================================
(Binary files differ)
Property changes on: workspace/mareshkau/xulrunner-1.9.1.2/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/libmozjs.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
15 years, 1 month
JBoss Tools SVN: r18783 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-11-23 10:48:37 -0500 (Mon, 23 Nov 2009)
New Revision: 18783
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-948 Open On works if path was set using EL variable - section is agged to vwt guide
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2009-11-23 15:36:05 UTC (rev 18782)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2009-11-23 15:48:37 UTC (rev 18783)
@@ -47,7 +47,7 @@
<property>Ctrl+Click</property>
</emphasis> on a reference to another file and the file will be opened.</para>
- <para>OpenOn is available for the following files and classes:</para>
+ <para>OpenOn is available for:</para>
<itemizedlist>
<listitem>
<para>
@@ -65,6 +65,9 @@
<listitem>
<para> <link linkend="cssclasses">CSS classes</link> </para>
</listitem>
+ <listitem>
+ <para> <link linkend="openonelvariables">Paths to files set using EL variable</link> </para>
+ </listitem>
</itemizedlist>
<section id="XMLFiles232">
@@ -180,7 +183,7 @@
</mediaobject>
</figure>
- OpenOn is also implemented for css classes added by a complex link.
+ <para>OpenOn is also implemented for css classes added by a complex link.</para>
<figure>
<title>OpenOn With CSS Class added by a complex link</title>
<mediaobject>
@@ -189,8 +192,23 @@
</imageobject>
</mediaobject>
</figure>
- </section>
-
+ </section>
+
+ <section id="openonelvariables">
+ <title>OpenOn for EL variables</title>
+ <para>OpenOn can be used for paths to files set with EL variable.</para>
+ <figure>
+ <title>OpenOn for paths to files set with EL variable</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_openon_el.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+
</section>
<section id="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">
@@ -333,8 +351,8 @@
</mediaobject>
</figure>
</section>
-
-
+
+
<section id="ContentAssistBasedOnProjectData86">
15 years, 1 month
JBoss Tools SVN: r18782 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model: project and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-11-23 10:36:05 -0500 (Mon, 23 Nov 2009)
New Revision: 18782
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarSystemImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNature.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5191
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java 2009-11-23 13:53:38 UTC (rev 18781)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java 2009-11-23 15:36:05 UTC (rev 18782)
@@ -193,6 +193,12 @@
}
}
+ public void forceUpdate() {
+ if(currentUpdate != null) {
+ currentUpdate.run();
+ }
+ }
+
public void resourceChanged(IResourceChangeEvent event) {
if(!isActive() || event == null || event.getDelta() == null) return;
if(!checkDelta(event.getDelta())) return;
@@ -208,7 +214,7 @@
// synchronized (this) {
currentUpdate = new UpdateRunnable();
// }
- XJob.addRunnable(currentUpdate);
+ XJob.addRunnableWithPriority(currentUpdate);
} else {
// synchronized (this) {
if(currentUpdate != null) currentUpdate.request++;
@@ -260,6 +266,7 @@
}
public void run() {
+ if(this != currentUpdate) return;
if(!isActive()) {
ModelPlugin.getWorkspace().removeResourceChangeListener(FileSystemsImpl.this);
} else {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2009-11-23 13:53:38 UTC (rev 18781)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2009-11-23 15:36:05 UTC (rev 18782)
@@ -147,13 +147,6 @@
List<String> paths = null;
- static String[] SYSTEM_JARS = {"rt.jar", "jsse.jar", "jce.jar", "charsets.jar"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- static Set<String> SYSTEM_JAR_SET = new HashSet<String>();
-
- static {
- for (int i = 0; i < SYSTEM_JARS.length; i++) SYSTEM_JAR_SET.add(SYSTEM_JARS[i]);
- }
-
private void updateLibs(XModelObject object) {
if(WatcherLoader.isLocked(object.getModel())) {
return;
@@ -194,7 +187,7 @@
String path = paths.get(i);
if(!EclipseResourceUtil.isJar(path)) continue;
String fileName = new File(path).getName();
- if(SYSTEM_JAR_SET.contains(fileName)) continue;
+ if(EclipseResourceUtil.SYSTEM_JAR_SET.contains(fileName)) continue;
String jsname = "lib-" + fileName; //$NON-NLS-1$
XModelObject o = object.getChildByPath(jsname);
if(o != null) {
@@ -244,7 +237,7 @@
_updateSrcs(object);
}
- private void _updateSrcs(XModelObject object) {
+ private static void _updateSrcs(XModelObject object) {
IProject p = EclipseResourceUtil.getProject(object);
if(p == null || !p.isAccessible()) return;
String[] srcs = EclipseResourceUtil.getJavaProjectSrcLocations(p);
@@ -275,7 +268,7 @@
}
}
- private String getNextSrcName(XModelObject object) {
+ private static String getNextSrcName(XModelObject object) {
if(object.getChildByPath("src") == null) return "src"; //$NON-NLS-1$ //$NON-NLS-2$
int i = 1;
while(true) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarSystemImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarSystemImpl.java 2009-11-23 13:53:38 UTC (rev 18781)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarSystemImpl.java 2009-11-23 15:36:05 UTC (rev 18782)
@@ -79,5 +79,15 @@
return true;
}
+ public String getPresentationString() {
+ String location = getLocation();
+ if(location != null) {
+ location = location.replace('\\', '/');
+ int i = location.lastIndexOf('/');
+ if(i >= 0) location = location.substring(i + 1);
+ return location;
+ }
+ return super.getPresentationString();
+ }
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNature.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNature.java 2009-11-23 13:53:38 UTC (rev 18781)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNature.java 2009-11-23 15:36:05 UTC (rev 18782)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.model.project;
import java.util.*;
+
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
import org.jboss.tools.common.model.*;
@@ -216,16 +217,32 @@
return checkModelNature(project, nature);
}
+ static Map<IProject, Set<String>> checked = new HashMap<IProject, Set<String>>();
+
public static boolean checkModelNature(IProject project, String nature) {
- if(project == null || !project.isOpen()) return false;
+ if(project == null || !project.isOpen()) {
+ if(project != null && checked.containsKey(project)) {
+ checked.remove(project);
+ }
+ return false;
+ }
if(nature == null) return false;
+ Set<String> ns = checked.get(project);
+ if(ns == null) {
+ ns = new HashSet<String>();
+ checked.put(project, ns);
+ } else if(ns.contains(nature)) {
+ return true;
+ }
String home = new ProjectHome().getLocation(project);
if(home != null && home.length() > 0) {
+ ns.add(nature);
return true;
}
if(!project.isSynchronized(1)) {
return false;
}
+ ns.add(nature);
return true;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2009-11-23 13:53:38 UTC (rev 18781)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2009-11-23 15:36:05 UTC (rev 18782)
@@ -15,9 +15,11 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.Set;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
@@ -56,6 +58,7 @@
import org.jboss.tools.common.model.filesystems.XFileObject;
import org.jboss.tools.common.model.filesystems.impl.FileSystemImpl;
import org.jboss.tools.common.model.filesystems.impl.FileSystemsImpl;
+import org.jboss.tools.common.model.filesystems.impl.FileSystemsLoader;
import org.jboss.tools.common.model.filesystems.impl.JarSystemImpl;
import org.jboss.tools.common.model.icons.impl.XModelObjectIcon;
import org.jboss.tools.common.model.impl.XModelObjectImpl;
@@ -63,6 +66,7 @@
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.project.ModelNature;
import org.jboss.tools.common.model.project.ModelNatureExtension;
+import org.jboss.tools.common.model.project.WatcherLoader;
import org.osgi.framework.Bundle;
public class EclipseResourceUtil {
@@ -369,17 +373,23 @@
properties.setProperty(XModelObjectConstants.ATTR_NAME, project.getName());
s = (FileSystemImpl)model.createModelObject(XModelObjectConstants.ENT_FILE_SYSTEM_FOLDER, properties);
fs.addChild(s);
- if(!isJar(resource)) {
- IResource webRoot = getFirstWebContentResource(project);
- if(webRoot != null && webRoot.exists() && webRoot != project) {
- fsLoc = webRoot.getLocation().toString();
- properties.setProperty(XModelObjectConstants.ATTR_NAME_LOCATION, fsLoc);
- properties.setProperty(XModelObjectConstants.ATTR_NAME, "WEB-ROOT"); //$NON-NLS-1$
- s = (FileSystemImpl)model.createModelObject(XModelObjectConstants.ENT_FILE_SYSTEM_FOLDER, properties);
- fs.addChild(s);
- }
+
+ Set<IResource> resources = new HashSet<IResource>();
+
+ IResource webRoot = getFirstWebContentResource(project);
+ if(webRoot != null && webRoot.exists() && webRoot != project) {
+ resources.add(webRoot);
+ fsLoc = webRoot.getLocation().toString();
+ properties.setProperty(XModelObjectConstants.ATTR_NAME_LOCATION, fsLoc);
+ properties.setProperty(XModelObjectConstants.ATTR_NAME, "WEB-ROOT"); //$NON-NLS-1$
+ s = (FileSystemImpl)model.createModelObject(XModelObjectConstants.ENT_FILE_SYSTEM_FOLDER, properties);
+ fs.addChild(s);
}
+ updateSrcs(project, fs, resources);
+
+ updateLibs(project, fs);
+
if(!isJar(resource) || getObjectByResource(model, resource) == null) {
properties = new Properties();
fsLoc = (r instanceof IFile) ? r.getParent().getLocation().toString() : r.getLocation().toString();
@@ -398,6 +408,7 @@
if(cs != null) for (int i = 0; i < cs.length; i++) {
if(!cs[i].isLinked()) continue;
if(!cs[i].isAccessible()) continue;
+ if(resources.contains(cs[i])) continue;
if(cs[i].getLocation() == null) {
// System.out.println("no location at link " + cs[i]);
continue;
@@ -442,7 +453,123 @@
fs.addChild(q);
}
}
-
+
+ private static void updateSrcs(IProject p, XModelObject object, Set<IResource> resources) {
+ if(p == null || !p.isAccessible()) return;
+ String[] srcs = EclipseResourceUtil.getJavaProjectSrcLocations(p);
+ Set<String> paths = new HashSet<String>();
+ for (int i = 0; i < srcs.length; i++) {
+ String path = EclipseResourceUtil.getRelativeLocation(object.getModel(), srcs[i]);
+ if(path == null) continue;
+ paths.add(path);
+ }
+ XModelObject[] cs = object.getChildren(XModelObjectConstants.ENT_FILE_SYSTEM_FOLDER);
+ for (int i = 0; i < cs.length; i++) {
+ if(cs[i].getAttributeValue(XModelObjectConstants.ATTR_NAME).startsWith("src")) { //$NON-NLS-1$
+ String loc = cs[i].getAttributeValue(XModelObjectConstants.ATTR_NAME_LOCATION);
+ if(!paths.contains(loc)) {
+ object.removeChild(cs[i]);
+ } else {
+ paths.remove(loc);
+ IResource r = (IResource)object.getAdapter(IResource.class);
+ if(r != null) resources.add(r);
+ }
+ }
+ }
+ for (String path : paths) {
+ String n = getNextSrcName(object);
+ Properties properties = new Properties();
+ properties.setProperty(XModelObjectConstants.ATTR_NAME_LOCATION, path);
+ properties.setProperty(XModelObjectConstants.ATTR_NAME, n);
+ FileSystemImpl s = (FileSystemImpl)object.getModel().createModelObject(XModelObjectConstants.ENT_FILE_SYSTEM_FOLDER, properties);
+ object.addChild(s);
+ IResource r = (IResource)s.getAdapter(IResource.class);
+ if(r != null) resources.add(r);
+ }
+ }
+
+ private static String getNextSrcName(XModelObject object) {
+ if(object.getChildByPath("src") == null) return "src"; //$NON-NLS-1$ //$NON-NLS-2$
+ int i = 1;
+ while(true) {
+ String s = "src-" + i; //$NON-NLS-1$
+ if(object.getChildByPath(s) == null) return s;
+ i++;
+ }
+ }
+
+ static String[] SYSTEM_JARS = {"rt.jar", "jsse.jar", "jce.jar", "charsets.jar"};
+ public static Set<String> SYSTEM_JAR_SET = new HashSet<String>();
+ static {
+ for (int i = 0; i < SYSTEM_JARS.length; i++) SYSTEM_JAR_SET.add(SYSTEM_JARS[i]);
+ }
+
+ private static void updateLibs(IProject project, XModelObject object) {
+ List<String> paths = new ArrayList<String>();
+ XModelObject[] ss = object.getChildren();
+ for (int i = 0; i < ss.length; i++) {
+ if(ss[i].getModelEntity().getName().equals("FileSystemJar")) {
+ paths.add(ss[i].getAttributeValue(XModelObjectConstants.ATTR_NAME_LOCATION));
+ }
+ }
+ List<String> newPaths = null;
+ try {
+ newPaths = EclipseResourceUtil.getClassPath(project.getProject());
+ List<String> jre = EclipseResourceUtil.getJREClassPath(project.getProject());
+ if(jre != null) newPaths.removeAll(jre);
+ } catch (CoreException e) {
+ //TODO
+ ModelPlugin.getDefault().logError(e);
+ } catch (IOException e) {
+ ModelPlugin.getDefault().logError(e);
+ }
+ if(paths == null && newPaths == null) return;
+ if((newPaths == null || paths == null) || (paths.size() != newPaths.size())) {
+ paths = newPaths;
+ } else {
+ boolean b = false;
+ for (int i = 0; i < paths.size() && !b; i++) {
+ if(!paths.get(i).equals(newPaths.get(i))) b = true;
+ }
+ if(!b) return;
+ paths = newPaths;
+ }
+ if(paths == null && newPaths == null) return;
+ XModelObject[] fs = object.getChildren("FileSystemJar"); //$NON-NLS-1$
+ Set<XModelObject> fss = new HashSet<XModelObject>();
+ for (int i = 0; i < fs.length; i++) fss.add(fs[i]);
+
+ for (int i = 0; i < paths.size(); i++) {
+ String path = paths.get(i);
+ if(!EclipseResourceUtil.isJar(path)) continue;
+ String fileName = new File(path).getName();
+ if(SYSTEM_JAR_SET.contains(fileName)) continue;
+ String jsname = "lib-" + fileName; //$NON-NLS-1$
+ XModelObject o = object.getChildByPath(jsname);
+ if(o != null) {
+ fss.remove(o);
+ } else {
+ o = object.getModel().createModelObject("FileSystemJar", null); //$NON-NLS-1$
+ o.setAttributeValue(XModelObjectConstants.ATTR_NAME, jsname);
+ o.setAttributeValue(XModelObjectConstants.ATTR_NAME_LOCATION, path);
+ o.set(FileSystemsLoader.IS_ADDED_TO_CLASSPATH, XModelObjectConstants.TRUE);
+ object.addChild(o);
+// object.setModified(true);
+ }
+ }
+
+ for (XModelObject o: fss) {
+ String path = XModelObjectUtil.expand(o.getAttributeValue(XModelObjectConstants.ATTR_NAME_LOCATION), o.getModel(), null);
+ if(XModelObjectConstants.TRUE.equals(o.get(FileSystemsLoader.IS_ADDED_TO_CLASSPATH))) {
+ o.removeFromParent();
+ } else if(!new File(path).exists()) {
+ o.removeFromParent();
+ }
+ }
+
+ }
+
+
public static XModelObject findResourceInFileSystem(FileSystemImpl s, IResource resource) {
if(resource == null || resource.getLocation() == null) {
return null;
15 years, 1 month
JBoss Tools SVN: r18781 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF: lib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-11-23 08:53:38 -0500 (Mon, 23 Nov 2009)
New Revision: 18781
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jsf-impl.jar
Log:
Fixed error in test project
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml 2009-11-23 12:49:11 UTC (rev 18780)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml 2009-11-23 13:53:38 UTC (rev 18781)
@@ -1,11 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
- version="2.0">
-
- <application>
- <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
- </application>
-</faces-config>
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
15 years, 1 month
JBoss Tools SVN: r18780 - branches/tycho_exp.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2009-11-23 07:49:11 -0500 (Mon, 23 Nov 2009)
New Revision: 18780
Added:
branches/tycho_exp/genpom.scala
Log:
script for generating pom.xml
Added: branches/tycho_exp/genpom.scala
===================================================================
--- branches/tycho_exp/genpom.scala (rev 0)
+++ branches/tycho_exp/genpom.scala 2009-11-23 12:49:11 UTC (rev 18780)
@@ -0,0 +1,195 @@
+import java.io.File
+import scala.io.Source
+import scala.xml.XML
+
+object HelloWorld {
+
+ case class GVA(groupId : String, artifactId : String, version : String)
+
+ var aggregatorcount = 0
+ var modulecount = 0
+
+ def main(args: Array[String]) {
+
+ generateAggregator(new File("c:/work/os/jbosstools/trunk"),
+ new File("parent-pom.xml"),
+ GVA("org.jboss.tools", "org.jboss.tools.parent.pom", "0.0.1-SNAPSHOT"),
+ GVA("org.jboss.tools", "trunk", "0.0.1-SNAPSHOT")
+ )
+
+ println("Modules: " + modulecount + " Aggregator: " + aggregatorcount)
+ }
+
+ def generateModule(dir : File, parentPom : File, parent : GVA, me : GVA) {
+ modulecount = modulecount + 1
+
+ var module =
+ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>{parentPom.getPath()}</relativePath>
+ <groupId>{parent.groupId}</groupId>
+ <artifactId>{parent.artifactId}</artifactId>
+ <version>{parent.version}</version>
+ </parent>
+ <groupId>{me.groupId}</groupId>
+ <artifactId>{me.artifactId}</artifactId>
+ <version>{getVersion(dir)}</version>
+ <packaging>{
+ if (dir.getParentFile().getName().equals("tests"))
+ "eclipse-test-plugin"
+ else if (dir.getParentFile().getName().equals("features"))
+ "eclipse-feature"
+ else
+ "eclipse-plugin"}</packaging>
+ </project>;
+
+ val pp = new scala.xml.PrettyPrinter(80,2)
+
+
+ writePom("Module ", pp.format(module), dir)
+
+ }
+
+ def writePom(n : String, pp : String, dir : File) {
+ val pomxml = new File(dir, "pom.xml")
+
+ val out = new java.io.FileWriter(pomxml)
+ out.write(pp)
+ out.close
+
+ }
+
+ def getVersion(dir : File) : String = {
+
+ var mf = new File(new File(dir, "META-INF"), "MANIFEST.MF")
+ var featurexml = new File(dir, "feature.xml")
+
+ if(mf.exists()) {
+ val lines = Source.fromFile(mf).getLines
+ for(l <- lines)
+ if(l.contains("Bundle-Version:")) {
+ return l.substring("Bundle-Version:".length()).trim()
+ }
+ } else if (featurexml.exists()) {
+ val data = XML.loadFile(featurexml)
+ return (data \ "@version").text
+ }
+ return dir + " " + featurexml.exists() + " " + mf.exists()
+ }
+
+ def getArtifactId(dir : File) : String = {
+
+ var mf = new File(new File(dir, "META-INF"), "MANIFEST.MF")
+ var featurexml = new File(dir, "feature.xml")
+
+ if(mf.exists()) {
+ val lines = Source.fromFile(mf).getLines
+ for(l <- lines)
+ if(l.contains("Bundle-SymbolicName:")) {
+ val x = l.substring("Bundle-SymbolicName:".length()).trim()
+ if(x.indexOf(";")>=0) {
+ return x.substring(0, x.indexOf(";"))
+ } else {
+ return x
+ }
+ }
+ } else if (featurexml.exists()) {
+ val data = XML.loadFile(featurexml)
+ return (data \ "@id").text
+ }
+ return dir + " " + featurexml.exists() + " " + mf.exists()
+ }
+
+ def dump(dirs : Collection[File], parentPom : File, parent : GVA, me : GVA) {
+ for(f <- dirs) {
+
+ val manifest = new File(new File(f, "META-INF"), "MANIFEST.MF")
+ val plugins = new File(f, "plugins")
+ val tests = new File(f, "tests")
+ val features = new File(f, "features")
+ val featurexml = new File(f, "feature.xml")
+
+ if(manifest.exists() || featurexml.exists()) {
+ generateModule(f,
+ new File("../" + parentPom.getPath()),
+ parent,
+ GVA(me.groupId, getArtifactId(f), me.version))
+ }
+
+ if(plugins.exists()) {
+ generateAggregator(plugins,
+ new File("../../" + parentPom.getPath()),
+ parent,
+ GVA(me.groupId, f.getName() , "0.0.1-SNAPSHOT")
+ )
+ }
+
+ if(tests.exists()) {
+ generateAggregator(tests,
+ new File("../../" + parentPom.getPath()),
+ parent,
+ GVA(me.groupId, f.getName() , "0.0.1-SNAPSHOT")
+ )
+ }
+
+ if(features.exists()) {
+ generateAggregator(features,
+ new File("../../" + parentPom.getPath()),
+ parent,
+ GVA(me.groupId, f.getName() , "0.0.1-SNAPSHOT")
+ )
+ }
+
+ }
+ }
+
+ def generateAggregator(dir : File,
+ parentPom : File,
+ parent : GVA,
+ me : GVA
+ ) {
+ aggregatorcount = aggregatorcount + 1
+
+ val dirs = dir.listFiles().filter(
+ (n) => n.isDirectory() && !n.getName().startsWith(".")
+ )
+
+ val realModules = dirs.filter(
+ (n) => n.isDirectory() && !n.getName().startsWith(".") && new File(new File(n, "META-INF"), "MANIFEST.MF").exists()
+ )
+ var modules =
+ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>{parentPom.getPath()}</relativePath>
+ <groupId>{parent.groupId}</groupId>
+ <artifactId>{parent.artifactId}</artifactId>
+ <version>{parent.version}</version>
+ </parent>
+ <groupId>{me.groupId}</groupId>
+ <artifactId>{me.artifactId}.{dir.getName()}</artifactId>
+ <version>{me.version}</version>
+ <packaging>pom</packaging>
+ <modules>
+ {
+ for(f <- realModules) yield {
+ <module>{ f.getName() }</module>
+ }
+ }
+ </modules>
+ </project>;
+
+ val pp = new scala.xml.PrettyPrinter(80,2)
+ writePom("Aggregator ", pp.format(modules),dir)
+ //println(pp.format(modules))
+
+ dump(dirs, parentPom, parent, me)
+
+
+ }
+
+}
+
+
+HelloWorld.main(args)
15 years, 1 month
JBoss Tools SVN: r18779 - in branches/tycho_exp: jmx/plugins/org.jboss.tools.jmx.core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2009-11-23 07:48:33 -0500 (Mon, 23 Nov 2009)
New Revision: 18779
Modified:
branches/tycho_exp/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
branches/tycho_exp/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF
branches/tycho_exp/jmx/plugins/org.jboss.tools.jmx.core/pom.xml
Log:
version updated
Modified: branches/tycho_exp/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
===================================================================
--- branches/tycho_exp/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2009-11-23 12:17:41 UTC (rev 18778)
+++ branches/tycho_exp/as/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2009-11-23 12:48:33 UTC (rev 18779)
@@ -20,7 +20,7 @@
org.jboss.ide.eclipse.as.ui;bundle-version="1.0.0",
org.eclipse.core.filesystem;bundle-version="1.2.0",
org.eclipse.ui.navigator;bundle-version="3.3.100",
- org.jboss.tools.jmx.core;bundle-version="0.2.1",
+ org.jboss.tools.jmx.core;bundle-version="1.0.1",
org.eclipse.core.variables;bundle-version="3.2.200",
org.jboss.ide.eclipse.as.wtp.core;bundle-version="1.0.0",
org.jboss.ide.eclipse.as.wtp.ui;bundle-version="1.0.0",
Modified: branches/tycho_exp/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF
===================================================================
--- branches/tycho_exp/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF 2009-11-23 12:17:41 UTC (rev 18778)
+++ branches/tycho_exp/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF 2009-11-23 12:48:33 UTC (rev 18779)
@@ -1,7 +1,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %BundleName
Bundle-SymbolicName: org.jboss.tools.jmx.core;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.1
Bundle-Activator: org.jboss.tools.jmx.core.JMXActivator
Bundle-Vendor: %BundleProvider
Require-Bundle: org.eclipse.core.runtime
Modified: branches/tycho_exp/jmx/plugins/org.jboss.tools.jmx.core/pom.xml
===================================================================
--- branches/tycho_exp/jmx/plugins/org.jboss.tools.jmx.core/pom.xml 2009-11-23 12:17:41 UTC (rev 18778)
+++ branches/tycho_exp/jmx/plugins/org.jboss.tools.jmx.core/pom.xml 2009-11-23 12:48:33 UTC (rev 18779)
@@ -9,6 +9,6 @@
</parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.jmx.core</artifactId>
- <version>1.0.1.qualifier</version>
+ <version>1.0.1</version>
<packaging>eclipse-plugin</packaging>
</project>
15 years, 1 month