JBoss Tools SVN: r17705 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-09-23 11:53:25 -0400 (Wed, 23 Sep 2009)
New Revision: 17705
Modified:
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-861 - updating the 'Creating a Hibernate Mapping File' section;
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2009-09-23 15:51:15 UTC (rev 17704)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2009-09-23 15:53:25 UTC (rev 17705)
@@ -33,11 +33,11 @@
<para>Hibernate mapping files are used to specify how your objects are related to database
tables.</para>
- <para>For creating a skeleton mapping file, i. e. any <emphasis>
+ <para>To create basic mappings for properties and associations, i. e. generate <emphasis>
<property>.hbm.xml</property>
- </emphasis>, Hibernate Tools provide a basic wizard which you can bring up by navigating <emphasis>
+ </emphasis> files, Hibernate Tools provide a basic wizard which you can bring up by navigating <emphasis>
<property>New > Hibernate XML mapping file</property>.</emphasis></para>
-
+ <para>At first you'll be asked to select a package or multiple individual classes to map.</para>
<figure>
<title>Hibernate XML Mapping File Wizard</title>
@@ -48,10 +48,9 @@
</mediaobject>
</figure>
- <para>At first you'll be asked to specify the location and the name for a new mapping
- file. On the next dialog you should type or browse the class to map.</para>
+ <para>Next wizard page lists the mappings to be generated.</para>
<figure>
- <title>Specifying the Class to Map</title>
+ <title>Mappings to be generated</title>
<mediaobject>
<imageobject>
@@ -59,22 +58,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>Pressing finish creates the file and opens it in the <link
- linkend="map_config_struct_editor">structured hbm.xml editor</link>.</para>
+ <para>Pressing finish creates the files.</para>
- <para> If you start the wizard from the selected class, all values will be detected there
- automatically.</para>
-
- <figure>
- <title>Creating Mapping File for Selected Class</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/plugins/plugins_0_b.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
</section>
<section id="hib_config_file">
16 years, 3 months
JBoss Tools SVN: r17704 - trunk/hibernatetools/docs/reference/en/images/plugins.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-09-23 11:51:15 -0400 (Wed, 23 Sep 2009)
New Revision: 17704
Modified:
trunk/hibernatetools/docs/reference/en/images/plugins/plugins_0.png
trunk/hibernatetools/docs/reference/en/images/plugins/plugins_0_a.png
Log:
https://jira.jboss.org/jira/browse/JBDS-861 - adding new images;
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_0.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_0_a.png
===================================================================
(Binary files differ)
16 years, 3 months
JBoss Tools SVN: r17702 - in trunk: jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-09-23 11:06:27 -0400 (Wed, 23 Sep 2009)
New Revision: 17702
Added:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4935, default values for VPE Preference Page are initialized now.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2009-09-23 12:58:07 UTC (rev 17701)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2009-09-23 15:06:27 UTC (rev 17702)
@@ -550,5 +550,10 @@
</markerResolutionGenerator>
</extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.jboss.tools.jst.jsp.preferences.VpePreferencesInitializer"/>
+ </extension>
+
</plugin>
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java 2009-09-23 12:58:07 UTC (rev 17701)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java 2009-09-23 15:06:27 UTC (rev 17702)
@@ -31,4 +31,5 @@
static final String SPLITTING_HORIZ_LEFT_SOURCE_VALUE = "3"; //$NON-NLS-1$
static final String SPLITTING_HORIZ_LEFT_VISUAL_VALUE = "4"; //$NON-NLS-1$
+ static final int DEFAULT_VISUAL_SOURCE_EDITORS_WEIGHTS = 500;
}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java 2009-09-23 15:06:27 UTC (rev 17702)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.jst.jsp.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+
+public class VpePreferencesInitializer extends AbstractPreferenceInitializer {
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(JspEditorPlugin.PLUGIN_ID);
+
+ defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_BORDER_FOR_UNKNOWN_TAGS, false);
+ defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_NON_VISUAL_TAGS, false);
+ defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_SELECTION_TAG_BAR, false);
+ defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL, false);
+ defaultPreferences.putBoolean(IVpePreferencesPage.ASK_TAG_ATTRIBUTES_ON_TAG_INSERT, true);
+ defaultPreferences.putBoolean(IVpePreferencesPage.ASK_CONFIRMATION_ON_CLOSING_SELECTION_BAR, true);
+ defaultPreferences.put(IVpePreferencesPage.DEFAULT_VPE_TAB, IVpePreferencesPage.DEFAULT_VPE_TAB_VISUAL_SOURCE_VALUE);
+ defaultPreferences.put(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING, IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE);
+ defaultPreferences.putInt(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_WEIGHTS, IVpePreferencesPage.DEFAULT_VISUAL_SOURCE_EDITORS_WEIGHTS);
+
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2009-09-23 12:58:07 UTC (rev 17701)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2009-09-23 15:06:27 UTC (rev 17702)
@@ -1176,7 +1176,7 @@
public static boolean isSourceEditorFirst() {
boolean sourceEditorFirst = false;
String splitting = JspEditorPlugin.getDefault().getPreferenceStore()
- .getString(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING);
+ .getString(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING);
if (IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE
.equalsIgnoreCase(splitting)
|| IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE
16 years, 3 months
JBoss Tools SVN: r17701 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-09-23 08:58:07 -0400 (Wed, 23 Sep 2009)
New Revision: 17701
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4891 - fixed -> activate the proper page
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-09-23 11:22:25 UTC (rev 17700)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-09-23 12:58:07 UTC (rev 17701)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * 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,
@@ -27,6 +27,7 @@
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.SelectionListenerAction;
+import org.eclipse.ui.part.MultiPageEditorPart;
import org.eclipse.ui.texteditor.ITextEditor;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
@@ -220,6 +221,9 @@
IJavaProject proj = ProjectUtils.findJavaProject(editorPart);
IRegion selectRegion = OpenMappingUtils.findSelectRegion(proj, findAdapter, selection);
if (selectRegion != null) {
+ if (editorPart instanceof MultiPageEditorPart) {
+ ((MultiPageEditorPart)editorPart).setActiveEditor(textEditor);
+ }
textEditor.selectAndReveal(selectRegion.getOffset(), selectRegion.getLength());
return true;
}
@@ -277,6 +281,9 @@
int length = compositeProperty.getNodeName().length();
int offset = propRegion.getOffset() + propRegion.getLength() - length - 1;
propRegion = new Region(offset, length);
+ if (editorPart instanceof MultiPageEditorPart) {
+ ((MultiPageEditorPart)editorPart).setActiveEditor(textEditor);
+ }
textEditor.selectAndReveal(propRegion.getOffset(), propRegion.getLength());
return true;
}
16 years, 3 months
JBoss Tools SVN: r17700 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-23 07:22:25 -0400 (Wed, 23 Sep 2009)
New Revision: 17700
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.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-4912
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java 2009-09-23 10:39:42 UTC (rev 17699)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java 2009-09-23 11:22:25 UTC (rev 17700)
@@ -62,8 +62,9 @@
protected boolean loaded = false;
protected IContainer resource = null;
protected String pathForResource = null;
- protected Map<String, File> linked = new HashMap<String, File>();
- protected Map<String, IResource> linkedResources = new HashMap<String, IResource>();
+ LinkedResources linked = new LinkedResources();
+// protected Map<String, File> linked = new HashMap<String, File>();
+// protected Map<String, IResource> linkedResources = new HashMap<String, IResource>();
public FolderImpl() {}
@@ -111,8 +112,8 @@
protected String getAbsolutePath() {
FolderImpl parent = (FolderImpl)getParent();
String p = (parent == null) ? null : parent.getAbsolutePath();
- if(parent.linked.containsKey(getPathPart())) {
- return parent.linked.get(getPathPart()).getAbsolutePath();
+ if(parent.linked.containsFile(getPathPart())) {
+ return parent.linked.getFileByFileName(getPathPart()).getAbsolutePath();
}
return (p == null) ? null : p + XModelObjectConstants.SEPARATOR + name();
}
@@ -157,10 +158,12 @@
for (int i = 0; i < rs.length; i++) {
if(!rs[i].isAccessible()) continue;
if(!rs[i].isLinked()) continue;
+ if(rs[i].getLocation() == null) {
+// System.out.println("no location at link " + rs[i]);
+ continue;
+ }
File f = rs[i].getLocation().toFile();
- String pp = FilePathHelper.toPathPath(f.getName());
- linked.put(pp, f);
- linkedResources.put(pp, rs[i]);
+ linked.registerResource(rs[i]);
_loadChild(peer, f);
}
@@ -187,8 +190,8 @@
p.setProperty(XModelObjectConstants.ATTR_NAME, f.getName());
XModelObject c = getModel().createModelObject("FileFolder", p); //$NON-NLS-1$
String pp = FilePathHelper.toPathPath(f.getName());
- if(linked.containsKey(pp)) {
- c.setObject("file", linked.get(pp)); //$NON-NLS-1$
+ if(linked.containsFile(pp)) {
+ c.setObject("file", linked.getFileByFileName(pp)); //$NON-NLS-1$
}
addChild(c);
} else {
@@ -246,7 +249,7 @@
c.set(XModelObjectConstants.ATTR_NAME__FILE, f.getAbsolutePath());
}
}
- if(linked.containsValue(f)) {
+ if(linked.filesByFileName.containsValue(f)) {
c.setObject("file", f); //$NON-NLS-1$
}
addChild(c);
@@ -259,7 +262,7 @@
if(updateLock > 0) return true;
updateLock++;
Map<String,File> mf = new HashMap<String,File>();
- linked.clear();
+ linked.clearFiles();
XModelObject fileSystem = getFileSystem();
if(fileSystem == null) return false;
FileSystemsImpl fsi = (FileSystemsImpl)fileSystem.getParent();
@@ -302,8 +305,7 @@
File f = rs[i].getLocation().toFile();
String p = FilePathHelper.toPathPath(f.getName());
mf.put(p, f);
- linked.put(p, f);
- linkedResources.put(p, rs[i]);
+ linked.registerResource(rs[i]);
}
}
}
@@ -371,8 +373,8 @@
protected File getChildIOFile(XModelObject o) {
String s = FileAnyImpl.toFileName(o);
File f = (File)o.getObject("file"); //for links //$NON-NLS-1$
- if(f == null && linked.containsKey(o.getPathPart())) {
- f = linked.get(o.getPathPart());
+ if(f == null && linked.containsFile(o.getPathPart())) {
+ f = linked.getFileByFileName(o.getPathPart());
}
if(f == null) {
f = new File(getFile(), s);
@@ -383,8 +385,8 @@
protected File getChildIOFile(String filename) {
File f = null;
String p = FilePathHelper.toPathPath(filename);
- if(linked.containsKey(p)) {
- f = linked.get(p);
+ if(linked.containsFile(p)) {
+ f = linked.getFileByFileName(p);
}
if(f == null) {
f = new File(getFile(), filename);
@@ -615,8 +617,8 @@
p.setProperty(XModelObjectConstants.ATTR_NAME, f.getName());
c = getModel().createModelObject("FileFolder", p); //$NON-NLS-1$
String pp = FilePathHelper.toPathPath(f.getName());
- if(linked.containsKey(pp)) {
- c.setObject("file", linked.get(pp)); //$NON-NLS-1$
+ if(linked.containsFile(pp)) {
+ c.setObject("file", linked.getFileByFileName(pp)); //$NON-NLS-1$
}
} else {
Properties ep = getEntityProperties(f);
@@ -724,7 +726,7 @@
if (q || loaded) return q;
if(getParent() instanceof FolderImpl) {
FolderImpl p = (FolderImpl)getParent();
- if(p.linked.containsKey(getPathPart())) return true;
+ if(p.linked.containsFile(getPathPart())) return true;
}
File[] fs = getFiles();
q = (fs != null && fs.length > 0);
@@ -764,7 +766,7 @@
if(cs[i] instanceof FolderLoader) {
b &= ((FolderLoader)cs[i]).save();
} else {
- File d = linked.get(cs[i].getPathPart());
+ File d = linked.getFileByFileName(cs[i].getPathPart());
if(d == null) {
d = new File(f, FileAnyImpl.toFileName(cs[i]));
}
@@ -809,7 +811,7 @@
updateLock++;
boolean b = false;
try {
- File d = linked.get(c.getPathPart());
+ File d = linked.getFileByFileName(c.getPathPart());
if(d == null) {
d = new File(folder, FileAnyImpl.toFileName(c));
}
@@ -923,6 +925,10 @@
}
public XModelObject getChildByPathPart(String pathpart) {
+ if(linked.filesByLinkName.containsKey(pathpart)) {
+ File f = linked.getFileByResourceName(pathpart);
+ pathpart = f.getName();
+ }
pathpart = FilePathHelper.toPathPath(pathpart);
return super.getChildByPathPart(pathpart);
}
@@ -972,8 +978,8 @@
}
public IContainer getChildContainer(String name) {
- if(linked.containsKey(name)) {
- IResource r = linkedResources.get(name);
+ if(linked.containsFile(name)) {
+ IResource r = linked.getResourceByFileName(name);
return r instanceof IContainer ? (IContainer)r : null;
}
IContainer c = getResource();
@@ -981,8 +987,8 @@
}
public IFile getChildFile(String name) {
- if(linked.containsKey(name)) {
- IResource r = linkedResources.get(name);
+ if(linked.containsFile(name)) {
+ IResource r = linked.getResourceByFileName(name);
return r instanceof IFile ? (IFile)r : null;
}
IContainer c = getResource();
@@ -1061,6 +1067,48 @@
}
+class LinkedResources {
+ protected Map<String, File> filesByLinkName = new HashMap<String, File>();
+ protected Map<String, File> filesByFileName = new HashMap<String, File>();
+ protected Map<String, IResource> resourcesByLinkName = new HashMap<String, IResource>();
+ protected Map<String, IResource> resourcesByFileName = new HashMap<String, IResource>();
+
+ public boolean containsFile(String name) {
+ if(filesByFileName.containsKey(name)) return true;
+ return false;
+ }
+
+ public File getFileByResourceName(String name) {
+ return filesByLinkName.get(name);
+ }
+
+ public File getFileByFileName(String name) {
+ return filesByFileName.get(name);
+ }
+
+ public IResource getResourceByResourceName(String name) {
+ return resourcesByLinkName.get(name);
+ }
+
+ public IResource getResourceByFileName(String name) {
+ return resourcesByFileName.get(name);
+ }
+
+ public void registerResource(IResource r) {
+ File f = r.getLocation().toFile();
+ String pp = FilePathHelper.toPathPath(f.getName());
+ filesByFileName.put(pp, f);
+ filesByLinkName.put(r.getName(), f);
+ resourcesByFileName.put(pp, r);
+ resourcesByLinkName.put(r.getName(), r);
+ }
+
+ public void clearFiles() {
+ filesByFileName.clear();
+ filesByLinkName.clear();
+ }
+}
+
class EclipseFileBodySource implements BodySource {
IFile ef = null;
File f;
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-09-23 10:39:42 UTC (rev 17699)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2009-09-23 11:22:25 UTC (rev 17700)
@@ -374,6 +374,14 @@
}
if(cs != null) for (int i = 0; i < cs.length; i++) {
if(!cs[i].isLinked()) continue;
+ if(!cs[i].isAccessible()) continue;
+ if(cs[i].getLocation() == null) {
+// System.out.println("no location at link " + cs[i]);
+ continue;
+ }
+ if(cs[i].getLocation().toFile() == null || !cs[i].getLocation().toFile().isDirectory()) {
+ continue;
+ }
properties = new Properties();
fsLoc = cs[i].getLocation().toString();
properties.setProperty(XModelObjectConstants.ATTR_NAME_LOCATION, fsLoc);
@@ -418,9 +426,9 @@
}
IResource sr = s.getResource();
if(sr == null) return null;
- if(!sr.getLocation().isPrefixOf(resource.getLocation())) return null;
- String path = resource.getLocation().toString();
- String rootpath = sr.getLocation().toString();
+ if(!sr.getFullPath().isPrefixOf(resource.getFullPath())) return null;
+ String path = resource.getFullPath().toString();
+ String rootpath = sr.getFullPath().toString();
String relpath = path.substring(rootpath.length()).replace('\\', '/');
if(relpath.length() == 0) return s;
@@ -434,7 +442,7 @@
while(p != null && !XModelObjectConstants.TRUE.equals(p.get("overlapped"))) p = p.getParent(); //$NON-NLS-1$
if(p == null) {
IResource r = (IResource)o.getAdapter(IResource.class);
- if(r == null || !resource.getLocation().equals(r.getLocation())) {
+ if(r == null || !resource.getFullPath().equals(r.getFullPath())) {
//failure, more detailed file system is needed.
return null;
}
16 years, 3 months
JBoss Tools SVN: r17699 - in trunk/jst/plugins: org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-09-23 06:39:42 -0400 (Wed, 23 Sep 2009)
New Revision: 17699
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleListener.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleRuleContainer.java
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/StyleContainer.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4677
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleListener.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleListener.java 2009-09-23 07:57:59 UTC (rev 17698)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleListener.java 2009-09-23 10:39:42 UTC (rev 17699)
@@ -98,7 +98,7 @@
ISelection selectionToLiteners = null;
- if (newStyle != null) {
+ if (newStyle != null && newStyle.isValid()) {
selectionToLiteners = new StructuredSelection(newStyle);
} else {
selectionToLiteners = StructuredSelection.EMPTY;
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleRuleContainer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleRuleContainer.java 2009-09-23 07:57:59 UTC (rev 17698)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleRuleContainer.java 2009-09-23 10:39:42 UTC (rev 17699)
@@ -100,4 +100,11 @@
}
+ @Override
+ public boolean isValid() {
+ final String text = styleRule.getCssText();
+ if ((text != null) && (!text.endsWith(Constants.RIGHT_BRACE)))
+ return false;
+ return true;
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/StyleContainer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/StyleContainer.java 2009-09-23 07:57:59 UTC (rev 17698)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/StyleContainer.java 2009-09-23 10:39:42 UTC (rev 17699)
@@ -50,4 +50,8 @@
public abstract void removeNodelListener(INodeAdapter adapter);
+ public boolean isValid() {
+ return true;
+ }
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2009-09-23 07:57:59 UTC (rev 17698)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2009-09-23 10:39:42 UTC (rev 17699)
@@ -52,9 +52,6 @@
*/
public class CSSModel implements ICSSDialogModel {
- private static String startBraces = "{"; //$NON-NLS-1$
- private static String endBraces = "}"; //$NON-NLS-1$
-
private IStructuredModel model = null;
private IFile styleFile = null;
@@ -131,7 +128,7 @@
if ((styleSheet != null) && (selector != null)
&& !selector.equals(Constants.EMPTY)) {
CSSStyleRule rule = (CSSStyleRule) ((ICSSDocument) styleSheet)
- .createCSSRule(selector + startBraces + endBraces);
+ .createCSSRule(selector + Constants.LEFT_BRACE + Constants.RIGHT_BRACE);
((ICSSStyleSheet) styleSheet).appendRule(rule);
for (Map.Entry<String, CSSStyleRule> ruleEntry : getRulesMapping()
@@ -312,8 +309,8 @@
if ((rules != null) && (rules.getLength() > 0)) {
final CSSRule rule = rules.item(rules.getLength() - 1);
final String text = rule.getCssText();
- if ((text != null) && (!text.endsWith(endBraces))) {
- rule.setCssText(text + "\n" + endBraces); //$NON-NLS-1$
+ if ((text != null) && (!text.endsWith(Constants.RIGHT_BRACE))) {
+ rule.setCssText(text + "\n" + Constants.RIGHT_BRACE); //$NON-NLS-1$
}
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2009-09-23 07:57:59 UTC (rev 17698)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2009-09-23 10:39:42 UTC (rev 17699)
@@ -7,7 +7,7 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.jst.jsp.outline.cssdialog.common;
import java.util.Arrays;
@@ -26,57 +26,65 @@
*/
public class Constants {
- public static final String extSizes[] = new String[] { "", "em", "ex", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- "px", "in", "cm", "mm", "pt", "pc" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ public static final String extSizes[] = new String[] { "", "em", "ex", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "px", "in", "cm", "mm", "pt", "pc" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- public static final Set elemFolder = Collections.unmodifiableSet(new HashSet(Arrays.asList(new String[] {
- "background-image", "list-style-image", "cursor", "cue-after", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "cue-before" }))); //$NON-NLS-1$
+ public static final Set elemFolder = Collections
+ .unmodifiableSet(new HashSet(
+ Arrays
+ .asList(new String[] {
+ "background-image", "list-style-image", "cursor", "cue-after", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "cue-before" }))); //$NON-NLS-1$
- public static final Set extElem = Collections.unmodifiableSet(new HashSet(Arrays.asList(new String[] {
- "border-bottom-width", "border-left-width", "borer-right-width", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- "border-top-width", "border-width", "bottom", "font-size", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "height", "left", "letter-spacing", "line-height", "margin", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- "margin-bottom", "margin-left", "margin-right", "margin-top", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "margin-offset", "margin-bottom", "max-height", "max-width", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "min-height", "min-width", "outline-width", "padding", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "padding-bottom", "padding-left", "padding-right", "padding-top", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "right", "size", "text-indent", "top", "vertical-align", "width", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- "word-spacing" }))); //$NON-NLS-1$
+ public static final Set extElem = Collections
+ .unmodifiableSet(new HashSet(
+ Arrays
+ .asList(new String[] {
+ "border-bottom-width", "border-left-width", "borer-right-width", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "border-top-width", "border-width", "bottom", "font-size", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "height", "left", "letter-spacing", "line-height", "margin", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "margin-bottom", "margin-left", "margin-right", "margin-top", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "margin-offset", "margin-bottom", "max-height", "max-width", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "min-height", "min-width", "outline-width", "padding", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "padding-bottom", "padding-left", "padding-right", "padding-top", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "right", "size", "text-indent", "top", "vertical-align", "width", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "word-spacing" }))); //$NON-NLS-1$
- public static final String NONE = "none"; //$NON-NLS-1$
+ public static final String NONE = "none"; //$NON-NLS-1$
- public static final String IMAGE_COLOR_FILE_LOCATION = "images/cssdialog/color.gif"; //$NON-NLS-1$
- public static final String IMAGE_FOLDER_FILE_LOCATION = "images/cssdialog/folder.gif"; //$NON-NLS-1$
- public static final String IMAGE_FONT_FILE_LOCATION = "images/cssdialog/font.gif"; //$NON-NLS-1$
- public static final String IMAGE_COLORLARGE_FILE_LOCATION = "images/cssdialog/color_large.gif"; //$NON-NLS-1$
- public static final String IMAGE_FOLDERLARGE_FILE_LOCATION = "images/cssdialog/folder_large.gif"; //$NON-NLS-1$
- public static final String IMAGE_FONTLARGE_FILE_LOCATION = "images/cssdialog/font_large.gif"; //$NON-NLS-1$
- public static final String IMAGE_LEFT_FILE_LOCATION = "images/cssdialog/left.gif"; //$NON-NLS-1$
- public static final String IMAGE_RIGHT_FILE_LOCATION = "images/cssdialog/right.gif"; //$NON-NLS-1$
- public static final String IMAGE_SAMPLE_FILE_LOCATION = "images/cssdialog/sample.gif"; //$NON-NLS-1$
-
- public static final int FIRST_COLUMN = 0;
- public static final int SECOND_COLUMN = 1;
+ public static final String IMAGE_COLOR_FILE_LOCATION = "images/cssdialog/color.gif"; //$NON-NLS-1$
+ public static final String IMAGE_FOLDER_FILE_LOCATION = "images/cssdialog/folder.gif"; //$NON-NLS-1$
+ public static final String IMAGE_FONT_FILE_LOCATION = "images/cssdialog/font.gif"; //$NON-NLS-1$
+ public static final String IMAGE_COLORLARGE_FILE_LOCATION = "images/cssdialog/color_large.gif"; //$NON-NLS-1$
+ public static final String IMAGE_FOLDERLARGE_FILE_LOCATION = "images/cssdialog/folder_large.gif"; //$NON-NLS-1$
+ public static final String IMAGE_FONTLARGE_FILE_LOCATION = "images/cssdialog/font_large.gif"; //$NON-NLS-1$
+ public static final String IMAGE_LEFT_FILE_LOCATION = "images/cssdialog/left.gif"; //$NON-NLS-1$
+ public static final String IMAGE_RIGHT_FILE_LOCATION = "images/cssdialog/right.gif"; //$NON-NLS-1$
+ public static final String IMAGE_SAMPLE_FILE_LOCATION = "images/cssdialog/sample.gif"; //$NON-NLS-1$
- public static final String EMPTY = ""; //$NON-NLS-1$
+ public static final int FIRST_COLUMN = 0;
+ public static final int SECOND_COLUMN = 1;
+
+ public static final String EMPTY = ""; //$NON-NLS-1$
public static final String WHITE_SPACE = " "; //$NON-NLS-1$
- public static String COLON = ":"; //$NON-NLS-1$
- public static String SEMICOLON = ";"; //$NON-NLS-1$
- public static String COMMA = ","; //$NON-NLS-1$
- public static String DASH = "-"; //$NON-NLS-1$
- public static String SLASH = "/"; //$NON-NLS-1$
+ public static String COLON = ":"; //$NON-NLS-1$
+ public static String SEMICOLON = ";"; //$NON-NLS-1$
+ public static String COMMA = ","; //$NON-NLS-1$
+ public static String DASH = "-"; //$NON-NLS-1$
+ public static String SLASH = "/"; //$NON-NLS-1$
public static final String START_BRACKET = "("; //$NON-NLS-1$
public static final String END_BRACKET = ")"; //$NON-NLS-1$
+ public static final String LEFT_BRACE = "{"; //$NON-NLS-1$
+ public static final String RIGHT_BRACE = "}"; //$NON-NLS-1$
- public static final RGB RGB_BLACK = new RGB(0,0,0);
- public static final RGB RGB_WHITE = new RGB(0xFF, 0xFF, 0xFF);
+ public static final RGB RGB_BLACK = new RGB(0, 0, 0);
+ public static final RGB RGB_WHITE = new RGB(0xFF, 0xFF, 0xFF);
- public static final int DONT_CONTAIN = -1;
-
- public static String OPEN_SPAN_TAG = "<span style=\"width: 100%;"; //$NON-NLS-1$
- public static String CLOSE_SPAN_TAG = "</span>"; //$NON-NLS-1$
- public static String OPEN_DIV_TAG = "<div style=\"width: 100%;"; //$NON-NLS-1$
- public static String CLOSE_DIV_TAG = "</div>"; //$NON-NLS-1$
+ public static final int DONT_CONTAIN = -1;
+
+ public static String OPEN_SPAN_TAG = "<span style=\"width: 100%;"; //$NON-NLS-1$
+ public static String CLOSE_SPAN_TAG = "</span>"; //$NON-NLS-1$
+ public static String OPEN_DIV_TAG = "<div style=\"width: 100%;"; //$NON-NLS-1$
+ public static String CLOSE_DIV_TAG = "</div>"; //$NON-NLS-1$
}
\ No newline at end of file
16 years, 3 months
JBoss Tools SVN: r17698 - trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-09-23 03:57:59 -0400 (Wed, 23 Sep 2009)
New Revision: 17698
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
Log:
JBIDE-4807:resource mapping about java project output location doesn't update once the output locatoin is changed
apply the patch
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2009-09-22 21:03:47 UTC (rev 17697)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2009-09-23 07:57:59 UTC (rev 17698)
@@ -11,8 +11,11 @@
package org.jboss.tools.esb.core.facet;
import java.io.ByteArrayInputStream;
-import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -22,6 +25,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
@@ -29,16 +33,22 @@
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.common.frameworks.CommonFrameworksPlugin;
import org.eclipse.jst.common.project.facet.WtpUtils;
import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
+import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
+import org.eclipse.wst.common.componentcore.internal.util.IComponentImplFactory;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.jboss.ide.eclipse.as.wtp.core.vcf.OutputFoldersVirtualComponent;
import org.jboss.tools.esb.core.ESBProjectCorePlugin;
+import org.jboss.tools.esb.core.component.ESBVirtualComponent;
import org.osgi.service.prefs.BackingStoreException;
public class JBossESBFacetInstallationDelegate implements IDelegate {
@@ -58,38 +68,32 @@
// Add WTP natures.
WtpUtils.addNatures(project);
- // Setup the flexible project structure.
- IVirtualComponent c = null;
- try {
- Method createMethod = ComponentCore.class.getMethod("createComponent", IProject.class, boolean.class);
- c = (IVirtualComponent)createMethod.invoke(null, project, false);
- } catch (Exception e) {
- c = ComponentCore.createComponent(project);
- }
+ // Setup the flexible project structure
+
+ /*
+ * This is necessary because at time, the project has NO facets
+ * So a call to createComponent(etc) returns a default implementation.
+ * Today, this WTP default implementation does not handle
+ * new reference types in an acceptable fashion
+ * (Does not use extension point).
+ */
+ IComponentImplFactory factory = new ESBVirtualComponent();
+ IVirtualComponent newComponent = factory.createComponent(project);
String outputLoc = jproj.readOutputLocation().removeFirstSegments(1).toString();
- c.create(0, null);
- c.setMetaProperty("java-output-path", outputLoc);
+ newComponent.create(0, null);
+ newComponent.setMetaProperty("java-output-path", outputLoc);
+
+ final IVirtualFolder jbiRoot = newComponent.getRootFolder();
- final IVirtualFolder jbiRoot = c.getRootFolder();
-
// Map the esbcontent to root for deploy
String resourcesFolder = model.getStringProperty(
IJBossESBFacetDataModelProperties.ESB_CONTENT_FOLDER);
jbiRoot.createLink(new Path("/" + resourcesFolder), 0, null);
-
-
- final IVirtualFolder jsrc = c.getRootFolder().getFolder("/"); //$NON-NLS-1$
- final IClasspathEntry[] cp2 = jproj.getRawClasspath();
- for (int i = 0; i < cp2.length; i++) {
- final IClasspathEntry cpe = cp2[i];
- if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
- if( cpe.getPath().removeFirstSegments(1).segmentCount() > 0 )
- jsrc.createLink(new Path(outputLoc), 0, null);
- }
- }
-
+
//addESBNature(project);
+ IVirtualComponent outputFoldersComponent = new OutputFoldersVirtualComponent(project, newComponent);
+ addReference(outputFoldersComponent, newComponent, "/", null);
JBossClassPathCommand command = new JBossClassPathCommand(project,
@@ -103,6 +107,32 @@
ClasspathHelper.addClasspathEntries(project, fv);
}
+ private void addReference(IVirtualComponent component, IVirtualComponent rootComponent, String path, String archiveName) {
+ IDataModelProvider provider = new CreateReferenceComponentsDataModelProvider();
+ IDataModel dm = DataModelFactory.createDataModel(provider);
+
+ dm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, rootComponent);
+ dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, Arrays.asList(component));
+
+ //[Bug 238264] the uri map needs to be manually set correctly
+ Map<IVirtualComponent, String> uriMap = new HashMap<IVirtualComponent, String>();
+ uriMap.put(component, archiveName);
+ dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, uriMap);
+ dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, path);
+
+ IStatus stat = dm.validateProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
+ Throwable t = stat.getException();
+ if (stat == null || stat.isOK()) {
+ try {
+ dm.getDefaultOperation().execute(new NullProgressMonitor(), null);
+ return;
+ } catch (ExecutionException e) {
+ t = e;
+ }
+ }
+ // TODO Log exception e
+ }
+
private IFile createJBossESBXML(IFolder folder) throws CoreException{
StringBuffer emptyESB = new StringBuffer();
String configVersion = model.getStringProperty(IJBossESBFacetDataModelProperties.ESB_CONFIG_VERSION);
@@ -142,6 +172,8 @@
esbContent.getFolder("META-INF").create(true, true, null);
createJBossESBXML(esbContent.getFolder("META-INF"));
+
+
project.refreshLocal(IResource.DEPTH_ZERO, null);
}
16 years, 3 months
JBoss Tools SVN: r17697 - trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-09-22 17:03:47 -0400 (Tue, 22 Sep 2009)
New Revision: 17697
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java
Log:
NPE when archive has no archiveName
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java 2009-09-22 21:03:06 UTC (rev 17696)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java 2009-09-22 21:03:47 UTC (rev 17697)
@@ -550,7 +550,8 @@
comp = refs[i].getReferencedComponent();
IPath val = refs[i].getRuntimePath();
if( refs[i].getDependencyType() != IVirtualReference.DEPENDENCY_TYPE_CONSUMES)
- val = val.append(refs[i].getArchiveName());
+ if( refs[i].getArchiveName() != null )
+ val = val.append(refs[i].getArchiveName());
objectToRuntimePath.put(comp, val.toString());
oldComponentToRuntimePath.put((IVirtualComponent) comp, val.toString());
16 years, 3 months
JBoss Tools SVN: r17696 - in trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core: util and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-09-22 17:03:06 -0400 (Tue, 22 Sep 2009)
New Revision: 17696
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ResourceListVirtualFolder.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/FilesetVirtualComponent.java
Log:
Ongoing slight cleanup when testing all the pieces that should go into a new project structure. Fixes include incorrect variable used in FilesetVirtualComponent, module factory superclass requires to state files that mandate a re-cache, etc
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java 2009-09-22 20:14:27 UTC (rev 17695)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/modules/JBTProjectModuleFactory.java 2009-09-22 21:03:06 UTC (rev 17696)
@@ -6,8 +6,11 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.StructureEdit;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -101,6 +104,13 @@
}
}
+ protected IPath[] getListenerPaths() {
+ return new IPath[] { new Path(".project"), // nature
+ new Path(StructureEdit.MODULE_META_FILE_NAME), // component
+ new Path(".settings/org.eclipse.wst.common.project.facet.core.xml") // facets
+ };
+ }
+
protected abstract JBTProjectModuleDelegate createDelegate(IProject project);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ResourceListVirtualFolder.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ResourceListVirtualFolder.java 2009-09-22 20:14:27 UTC (rev 17695)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ResourceListVirtualFolder.java 2009-09-22 21:03:06 UTC (rev 17696)
@@ -16,9 +16,6 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-// TODO THis class is fucked and incorrectly works.
-// The first instance (top) treats 'resources' as folders to search
-// Others try to treat it as items that are inside. This is bad.
public class ResourceListVirtualFolder extends VirtualFolder {
private ArrayList<IResource> children;
@@ -35,7 +32,7 @@
IProject aComponentProject,
IPath aRuntimePath, IContainer[] underlyingContainers) {
this(aComponentProject, aRuntimePath);
- this.underlying.addAll(Arrays.asList(underlyingContainers));
+ addUnderlyingResource(underlyingContainers);
}
public ResourceListVirtualFolder(
@@ -43,11 +40,11 @@
IPath aRuntimePath, IContainer[] underlyingContainers,
IResource[] looseResources) {
this(aComponentProject, aRuntimePath, underlyingContainers);
- this.children.addAll(Arrays.asList(looseResources));
+ addChildren(looseResources);
}
protected void addUnderlyingResource(IResource resource) {
- if( underlying instanceof IContainer ) {
+ if( resource instanceof IContainer ) {
underlying.add((IContainer)resource);
try {
IResource[] newChildren = ((IContainer)resource).members();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/FilesetVirtualComponent.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/FilesetVirtualComponent.java 2009-09-22 20:14:27 UTC (rev 17695)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/FilesetVirtualComponent.java 2009-09-22 21:03:06 UTC (rev 17696)
@@ -63,6 +63,7 @@
}
public IVirtualFolder getRootFolder() {
+ // Creates a new instance each time to ensure it's not cached
IContainer[] containers = getUnderlyingContainers();
IResource[] looseResources = getLooseResources();
ResourceListVirtualFolder folder =
16 years, 3 months