JBoss Tools SVN: r7543 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-04-16 04:27:52 -0400 (Wed, 16 Apr 2008)
New Revision: 7543
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1105Test.java
Log:
JBIDE-2075 SWT error when executing the testJBIDE1105 test
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1105Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1105Test.java 2008-04-15 21:31:05 UTC (rev 7542)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1105Test.java 2008-04-16 08:27:52 UTC (rev 7543)
@@ -71,7 +71,7 @@
}
for (int i = 0; i < 200; i++) {
int offset = styledText.getOffsetAtLine(23);
- styledText.setCaretOffset(offset - " Test ".length());
+ styledText.setCaretOffset(offset - " Test ".length() - delimiter.length());
styledText.insert(" Test ");
TestUtil.delay(50L);
}
17 years, 8 months
JBoss Tools SVN: r7542 - in trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core: jee and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-04-15 17:31:05 -0400 (Tue, 15 Apr 2008)
New Revision: 7542
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorations.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathCorePlugin.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java
Log:
JBIDE-1401 allow users to edit our classpathcontainers for src/javadoc etc.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathCorePlugin.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathCorePlugin.java 2008-04-15 21:17:42 UTC (rev 7541)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathCorePlugin.java 2008-04-15 21:31:05 UTC (rev 7542)
@@ -1,6 +1,9 @@
package org.jboss.ide.eclipse.as.classpath.core;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
import org.osgi.framework.BundleContext;
/**
@@ -47,4 +50,9 @@
return plugin;
}
+ public static void log(String msg,Throwable e) {
+ ILog log = ClasspathCorePlugin.getDefault().getLog();
+ IStatus status = new Status(Status.ERROR,ClasspathCorePlugin.PLUGIN_ID,msg,e);
+ log.log(status);
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java 2008-04-15 21:17:42 UTC (rev 7541)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java 2008-04-15 21:31:05 UTC (rev 7542)
@@ -27,15 +27,20 @@
import java.net.URL;
import java.util.ArrayList;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IAccessRule;
+import org.eclipse.jdt.core.IClasspathAttribute;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaCore;
import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
+import org.jboss.ide.eclipse.as.classpath.core.xpl.ClasspathDecorations;
+import org.jboss.ide.eclipse.as.classpath.core.xpl.ClasspathDecorationsManager;
/**
*
@@ -53,6 +58,12 @@
protected String description;
protected String libFolder;
+ private static ClasspathDecorationsManager decorations;
+ static {
+
+ decorations = new ClasspathDecorationsManager();
+ }
+
public AbstractClasspathContainer(IPath path, String description,
String libFolder) {
this.path = path;
@@ -109,15 +120,28 @@
IPath sourceAttachementPath = null;
IPath sourceAttachementRootPath = null;
- if (jarSrcFile.exists()) {
- sourceAttachementPath = new Path(jarSrcFile.toString());
- sourceAttachementRootPath = new Path("/");//$NON-NLS-1$
- }
-
- IClasspathEntry entry = JavaCore.newLibraryEntry(entryPath,
- sourceAttachementPath, sourceAttachementRootPath, true);
- entries.add(entry);
+ final ClasspathDecorations dec
+ = decorations.getDecorations( getDecorationManagerKey(getPath().toString()), entryPath.toString() );
+
+
+ IClasspathAttribute[] attrs = {};
+ if( dec != null )
+ {
+ sourceAttachementPath = dec.getSourceAttachmentPath();
+ sourceAttachementRootPath = dec.getSourceAttachmentRootPath();
+ attrs = dec.getExtraAttributes();
+ } else if (jarSrcFile.exists()) {
+ sourceAttachementPath = new Path(jarSrcFile.toString());
+ sourceAttachementRootPath = new Path("/");//$NON-NLS-1$
}
+
+ IAccessRule[] access = {};
+ IClasspathEntry entry = JavaCore.newLibraryEntry( entryPath, sourceAttachementPath, sourceAttachementRootPath, access, attrs,
+ false );
+ // IClasspathEntry entry = JavaCore.newLibraryEntry(entryPath,
+ // sourceAttachementPath, sourceAttachementRootPath, true);
+ entries.add(entry);
+ }
}
return (IClasspathEntry[]) entries.toArray(new IClasspathEntry[entries
@@ -140,4 +164,18 @@
}
return null;
}
+
+ public static String getDecorationManagerKey( String container){
+ return container;
+ }
+
+ static ClasspathDecorationsManager getDecorationsManager()
+ {
+ return decorations;
+ }
+
+ public void refresh() {
+ entries = computeEntries();
+ }
+
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java 2008-04-15 21:17:42 UTC (rev 7541)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java 2008-04-15 21:31:05 UTC (rev 7542)
@@ -24,50 +24,105 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.ClasspathContainerInitializer;
+import org.eclipse.jdt.core.IClasspathAttribute;
import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+import org.jboss.ide.eclipse.as.classpath.core.xpl.ClasspathDecorations;
+import org.jboss.ide.eclipse.as.classpath.core.xpl.ClasspathDecorationsManager;
/**
*
* @author Rob Stryker <rob.stryker(a)redhat.com>
- *
+ *
*/
-public abstract class AbstractClasspathContainerInitializer extends ClasspathContainerInitializer {
- public AbstractClasspathContainerInitializer() {
- }
+public abstract class AbstractClasspathContainerInitializer extends
+ ClasspathContainerInitializer {
+
+ public AbstractClasspathContainerInitializer() {
+ }
- /**
- * Description of the Method
- *
- * @param containerPath Description of the Parameter
- * @param project Description of the Parameter
- * @exception CoreException Description of the Exception
- */
- public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
- int size = containerPath.segmentCount();
- if (size > 0) {
- if (containerPath.segment(0).equals(this.getClasspathContainerID())) {
- AbstractClasspathContainer container = this.createClasspathContainer(containerPath);
- JavaCore.setClasspathContainer(containerPath, new IJavaProject[]
- {project}, new IClasspathContainer[]
- {container}, null);
- }
- }
- }
+ /**
+ * Description of the Method
+ *
+ * @param containerPath
+ * Description of the Parameter
+ * @param project
+ * Description of the Parameter
+ * @exception CoreException
+ * Description of the Exception
+ */
+ public void initialize(IPath containerPath, IJavaProject project)
+ throws CoreException {
+ int size = containerPath.segmentCount();
+ if (size > 0) {
+ if (containerPath.segment(0).equals(this.getClasspathContainerID())) {
+ AbstractClasspathContainer container = this
+ .createClasspathContainer(containerPath);
+ JavaCore.setClasspathContainer(containerPath,
+ new IJavaProject[] { project },
+ new IClasspathContainer[] { container }, null);
+ }
+ }
+ }
- /**
- * Description of the Method
- *
- * @param path Description of the Parameter
- * @return Description of the Return Value
- */
- protected abstract AbstractClasspathContainer createClasspathContainer(IPath path);
+ /**
+ * Description of the Method
+ *
+ * @param path
+ * Description of the Parameter
+ * @return Description of the Return Value
+ */
+ protected abstract AbstractClasspathContainer createClasspathContainer(
+ IPath path);
- /**
- * Gets the classpathContainerID attribute of the AbstractClasspathContainerInitializer object
- *
- * @return The classpathContainerID value
- */
- protected abstract String getClasspathContainerID();
+ /**
+ * Gets the classpathContainerID attribute of the
+ * AbstractClasspathContainerInitializer object
+ *
+ * @return The classpathContainerID value
+ */
+ protected abstract String getClasspathContainerID();
+
+ public boolean canUpdateClasspathContainer(IPath containerPath,
+ IJavaProject project) {
+ return true;
+ }
+
+ public void requestClasspathContainerUpdate(final IPath containerPath,
+ final IJavaProject project, final IClasspathContainer sg)
+
+ throws CoreException
+
+ {
+ String key = AbstractClasspathContainer
+ .getDecorationManagerKey(containerPath.toString());
+
+ IClasspathEntry[] entries = sg.getClasspathEntries();
+ ClasspathDecorationsManager decorations = AbstractClasspathContainer
+ .getDecorationsManager();
+ decorations.clearAllDecorations(key);
+
+ for (int i = 0; i < entries.length; i++) {
+ final IClasspathEntry entry = entries[i];
+
+ final IPath srcpath = entry.getSourceAttachmentPath();
+ final IPath srcrootpath = entry.getSourceAttachmentRootPath();
+ final IClasspathAttribute[] attrs = entry.getExtraAttributes();
+ final String eid = entry.getPath().toString();
+ final ClasspathDecorations dec = new ClasspathDecorations();
+
+ dec.setSourceAttachmentPath(srcpath);
+ dec.setSourceAttachmentRootPath(srcrootpath);
+ dec.setExtraAttributes(attrs);
+
+ decorations.setDecorations(key, eid, dec);
+ }
+ decorations.save();
+ final IClasspathContainer container = JavaCore.getClasspathContainer(
+ containerPath, project);
+ ((AbstractClasspathContainer) container).refresh();
+ }
+
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorations.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorations.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorations.java 2008-04-15 21:31:05 UTC (rev 7542)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * Copyright (c) 2005 BEA Systems, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Konstantin Komissarchik - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.ide.eclipse.as.classpath.core.xpl;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.JavaCore;
+
+/**
+ * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
+ */
+
+public final class ClasspathDecorations {
+ private IPath sourceAttachmentPath;
+ private IPath sourceAttachmentRootPath;
+ private ArrayList extraAttributes = new ArrayList();
+
+ public IPath getSourceAttachmentPath() {
+ return this.sourceAttachmentPath;
+ }
+
+ public void setSourceAttachmentPath(final IPath sourceAttachmentPath) {
+ this.sourceAttachmentPath = sourceAttachmentPath;
+ }
+
+ public IPath getSourceAttachmentRootPath() {
+ return this.sourceAttachmentRootPath;
+ }
+
+ public void setSourceAttachmentRootPath(final IPath sourceAttachmentRootPath) {
+ this.sourceAttachmentRootPath = sourceAttachmentRootPath;
+ }
+
+ public IClasspathAttribute[] getExtraAttributes() {
+ final IClasspathAttribute[] array = new IClasspathAttribute[this.extraAttributes
+ .size()];
+
+ return (IClasspathAttribute[]) this.extraAttributes.toArray(array);
+ }
+
+ public void setExtraAttributes(final IClasspathAttribute[] attrs) {
+ for (int i = 0; i < attrs.length; i++) {
+ this.extraAttributes.add(attrs[i]);
+ }
+ }
+
+ public void addExtraAttribute(final String name, final String value) {
+ final IClasspathAttribute attr = JavaCore.newClasspathAttribute(name,
+ value);
+
+ this.extraAttributes.add(attr);
+ }
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java 2008-04-15 21:31:05 UTC (rev 7542)
@@ -0,0 +1,316 @@
+package org.jboss.ide.eclipse.as.classpath.core.xpl;
+
+/******************************************************************************
+ * Copyright (c) 2005 BEA Systems, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Konstantin Komissarchik - initial API and implementation
+ ******************************************************************************/
+
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
+import org.osgi.service.prefs.BackingStoreException;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
+ */
+
+public final class ClasspathDecorationsManager {
+ private static final String CLASSPATH_PREFERENCES = "classpathPreferences";
+ private static final String SEPARATOR = System
+ .getProperty("line.separator");
+ private final HashMap decorations;
+
+ public ClasspathDecorationsManager() {
+ this.decorations = read();
+ }
+
+ private IEclipsePreferences getEclipsePreferences() {
+ IEclipsePreferences node = (IEclipsePreferences) Platform
+ .getPreferencesService().getRootNode()
+ .node(InstanceScope.SCOPE).node(ClasspathCorePlugin.PLUGIN_ID);
+ return node;
+ }
+
+ private String getPreferences() {
+ return getEclipsePreferences().get(CLASSPATH_PREFERENCES, null);
+ }
+
+ public ClasspathDecorations getDecorations(final String key,
+ final String entry) {
+ final HashMap submap = (HashMap) this.decorations.get(key);
+
+ if (submap == null) {
+ return null;
+ }
+
+ return (ClasspathDecorations) submap.get(entry);
+ }
+
+ public void setDecorations(final String key, final String entry,
+ final ClasspathDecorations dec) {
+ HashMap submap = (HashMap) this.decorations.get(key);
+
+ if (submap == null) {
+ submap = new HashMap();
+ this.decorations.put(key, submap);
+ }
+
+ submap.put(entry, dec);
+ }
+
+ public void clearAllDecorations(final String key) {
+ this.decorations.remove(key);
+ }
+
+ public void save() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("<classpath>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ for (Iterator itr1 = decorations.entrySet().iterator(); itr1.hasNext();) {
+ final Map.Entry entry1 = (Map.Entry) itr1.next();
+ final Map submap = (Map) entry1.getValue();
+
+ buffer.append(" <container id=\""); //$NON-NLS-1$
+ buffer.append((String) entry1.getKey());
+ buffer.append("\">"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+
+ for (Iterator itr2 = submap.entrySet().iterator(); itr2.hasNext();) {
+ final Map.Entry entry2 = (Map.Entry) itr2.next();
+
+ final ClasspathDecorations dec = (ClasspathDecorations) entry2
+ .getValue();
+
+ buffer.append(" <entry id=\""); //$NON-NLS-1$
+ buffer.append((String) entry2.getKey());
+ buffer.append("\">"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+
+ String src = "";
+ if (dec.getSourceAttachmentPath() != null) {
+ src = dec.getSourceAttachmentPath().toString();
+ }
+ buffer.append(" <source-attachment-path>"); //$NON-NLS-1$
+ buffer.append(src);
+ buffer.append("</source-attachment-path>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+
+ if (dec.getSourceAttachmentRootPath() != null) {
+ buffer.append(" <source-attachment-root-path>"); //$NON-NLS-1$
+ buffer.append(dec.getSourceAttachmentRootPath().toString());
+ buffer.append("</source-attachment-root-path>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ }
+
+ final IClasspathAttribute[] attrs = dec.getExtraAttributes();
+
+ for (int i = 0; i < attrs.length; i++) {
+ final IClasspathAttribute attr = attrs[i];
+
+ buffer.append(" <attribute name=\""); //$NON-NLS-1$
+ buffer.append(attr.getName());
+ buffer.append("\">"); //$NON-NLS-1$
+ buffer.append(attr.getValue());
+ buffer.append("</attribute>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ }
+
+ buffer.append(" </entry>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ }
+
+ buffer.append(" </container>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ }
+
+ buffer.append("</classpath>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ IEclipsePreferences ep = getEclipsePreferences();
+ ep.put(CLASSPATH_PREFERENCES, buffer.toString());
+ try {
+ ep.flush();
+ } catch (BackingStoreException e) {
+ String msg = "Encountered an unexpected exception.";
+ ClasspathCorePlugin.log(msg, e);
+ }
+ }
+
+ private HashMap read() {
+ final HashMap map = new HashMap();
+ String prefs = getPreferences();
+ if (prefs == null || prefs.length() <= 0)
+ return map;
+
+ Element root = null;
+ try {
+ final DocumentBuilderFactory factory = DocumentBuilderFactory
+ .newInstance();
+
+ final DocumentBuilder docbuilder = factory.newDocumentBuilder();
+
+ StringReader reader = new StringReader(prefs);
+ InputSource source = new InputSource(reader);
+ root = docbuilder.parse(source).getDocumentElement();
+ } catch (Exception e) {
+ String msg = "Encountered an unexpected exception.";
+ ClasspathCorePlugin.log(msg, e);
+ return map;
+ }
+
+ for (Iterator itr1 = elements(root, "container"); itr1.hasNext();) //$NON-NLS-1$
+ {
+ final Element e1 = (Element) itr1.next();
+ final String cid = e1.getAttribute("id"); //$NON-NLS-1$
+
+ final HashMap submap = new HashMap();
+ map.put(cid, submap);
+
+ for (Iterator itr2 = elements(e1, "entry"); itr2.hasNext();) //$NON-NLS-1$
+ {
+ final Element e2 = (Element) itr2.next();
+ final String eid = e2.getAttribute("id"); //$NON-NLS-1$
+ final ClasspathDecorations dec = new ClasspathDecorations();
+
+ submap.put(eid, dec);
+
+ for (Iterator itr3 = elements(e2); itr3.hasNext();) {
+ final Element e3 = (Element) itr3.next();
+ final String n = e3.getNodeName();
+ String text = text(e3);
+ if (text != null) {
+ if (n.equals("source-attachment-path")) //$NON-NLS-1$
+ {
+ dec.setSourceAttachmentPath(new Path(text(e3)));
+ } else if (n.equals("source-attachment-root-path")) //$NON-NLS-1$
+ {
+ dec.setSourceAttachmentRootPath(new Path(text(e3)));
+ }
+ }
+ if (n.equals("attribute")) //$NON-NLS-1$
+ {
+ final String name = e3.getAttribute("name"); //$NON-NLS-1$
+ dec.addExtraAttribute(name, text(e3));
+ }
+
+ }
+ }
+ }
+
+ return map;
+ }
+
+ private static String text(final Element el) {
+ final NodeList nodes = el.getChildNodes();
+
+ String str = null;
+ StringBuffer buf = null;
+
+ for (int i = 0, n = nodes.getLength(); i < n; i++) {
+ final Node node = nodes.item(i);
+
+ if (node.getNodeType() == Node.TEXT_NODE) {
+ final String val = node.getNodeValue();
+
+ if (buf != null) {
+ buf.append(val);
+ } else if (str != null) {
+ buf = new StringBuffer();
+ buf.append(str);
+ buf.append(val);
+
+ str = null;
+ } else {
+ str = val;
+ }
+ }
+ }
+
+ if (buf != null) {
+ return buf.toString();
+ }
+ return str;
+ }
+
+ private static Iterator elements(final Element el, final String name) {
+ return new ElementsIterator(el, name);
+ }
+
+ private static Iterator elements(final Element el) {
+ return new ElementsIterator(el, null);
+ }
+
+ private static final class ElementsIterator implements Iterator {
+ private final NodeList nodes;
+ private final int length;
+ private final String name;
+ private int position;
+ private Element element;
+
+ public ElementsIterator(final Element parent, final String name) {
+ this.nodes = parent.getChildNodes();
+ this.length = nodes.getLength();
+ this.position = -1;
+ this.name = name;
+
+ advance();
+ }
+
+ private void advance() {
+ this.element = null;
+ this.position++;
+
+ for (; this.position < this.length && this.element == null; this.position++) {
+ final Node node = this.nodes.item(this.position);
+
+ if (node.getNodeType() == Node.ELEMENT_NODE
+ && (this.name == null || node.getNodeName().equals(
+ this.name))) {
+ this.element = (Element) node;
+ }
+ }
+ }
+
+ public boolean hasNext() {
+ return (this.element != null);
+ }
+
+ public Object next() {
+ final Element el = this.element;
+
+ if (el == null) {
+ throw new NoSuchElementException();
+ }
+
+ advance();
+
+ return el;
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+}
17 years, 8 months
JBoss Tools SVN: r7541 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-04-15 17:17:42 -0400 (Tue, 15 Apr 2008)
New Revision: 7541
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
Log:
JBIDE-2055 hotkeys to "jump" between source and visual part of split vpe editor
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2008-04-15 16:33:53 UTC (rev 7540)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2008-04-15 21:17:42 UTC (rev 7541)
@@ -5,3 +5,4 @@
vpe.category=Visual Page Editor
source.maxmin=Maximize/Restore Source Part
visual.maxmin=Maximize/Restore Visual Part
+visual.jumping=Jump
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-04-15 16:33:53 UTC (rev 7540)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2008-04-15 21:17:42 UTC (rev 7541)
@@ -51,15 +51,22 @@
<command categoryId="org.jboss.tools.vpe.category"
id="org.jboss.tools.vpe.visual.maxmin"
name="%visual.maxmin"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.jumping"
+ name="%visual.jumping"/>
</extension>
<extension point="org.eclipse.ui.bindings">
<key commandId="org.jboss.tools.vpe.source.maxmin"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
contextId="org.jboss.tools.vpe.editorContext"
- sequence="M1+F6"/>
+ sequence="M2+F6"/>
<key commandId="org.jboss.tools.vpe.visual.maxmin"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
contextId="org.jboss.tools.vpe.editorContext"
- sequence="M1+M2+F6"/>
+ sequence="M2+M3+F6"/>
+ <key commandId="org.jboss.tools.vpe.jumping"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.jboss.tools.vpe.editorContext"
+ sequence="M1+M2+Tab"/>
</extension>
</plugin>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-04-15 16:33:53 UTC (rev 7540)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-04-15 21:17:42 UTC (rev 7541)
@@ -25,6 +25,7 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.events.DisposeEvent;
@@ -64,6 +65,7 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorExtension;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
@@ -85,8 +87,8 @@
public class VpeEditorPart extends EditorPart implements ITextEditor,
ITextEditorExtension, IReusableEditor, IVisualEditor {
private IContextActivation fContextActivation;
- private IHandlerActivation sourceActivation,visualActivation;
- private IHandler sourceMaxmin,visualMaxmin;
+ private IHandlerActivation sourceActivation,visualActivation, jumpingActivation;
+ private IHandler sourceMaxmin,visualMaxmin, jumping;
private CustomSashForm container;
protected EditorSettings editorSettings;
private StructuredTextEditor sourceEditor = null;
@@ -667,11 +669,13 @@
sourceMaxmin = new AbstractHandler() {
public Object execute(ExecutionEvent event)
throws ExecutionException {
- Point p = visualContent.getSize();
- if (p.x == 0 || p.y == 0) {
- container.upClicked();
- } else {
- container.maxDown();
+ if (getVisualMode() == IVisualEditor.VISUALSOURCE_MODE) {
+ Point p = visualContent.getSize();
+ if (p.x == 0 || p.y == 0) {
+ container.upClicked();
+ } else {
+ container.maxDown();
+ }
}
return null;
}
@@ -679,15 +683,48 @@
visualMaxmin = new AbstractHandler() {
public Object execute(ExecutionEvent event)
throws ExecutionException {
- Point p = sourceContent.getSize();
- if (p.x == 0 || p.y == 0) {
- container.downClicked();
- } else {
- container.maxUp();
+ if (getVisualMode() == IVisualEditor.VISUALSOURCE_MODE) {
+ Point p = sourceContent.getSize();
+ if (p.x == 0 || p.y == 0) {
+ container.downClicked();
+ } else {
+ container.maxUp();
+ }
}
return null;
}
};
+ jumping = new AbstractHandler() {
+ public Object execute(ExecutionEvent event)
+ throws ExecutionException {
+ if (getVisualMode() == IVisualEditor.VISUALSOURCE_MODE) {
+ StructuredTextEditor editor = getSourceEditor();
+ if (editor == null)
+ return null;
+ StructuredTextViewer viewer = editor.getTextViewer();
+ if (viewer == null)
+ return null;
+ StyledText widget = viewer.getTextWidget();
+ if (widget == null || widget.isDisposed())
+ return null;
+ if (widget.isFocusControl()) {
+ if (visualEditor != null
+ && activeEditor != visualEditor) {
+ activeEditor = visualEditor;
+ setFocus();
+ //visualContent.setFocus();
+ }
+ } else {
+ if (activeEditor != sourceEditor) {
+ activeEditor = sourceEditor;
+ setFocus();
+ }
+ }
+
+ }
+ return null;
+ }
+ };
}
public void createVisualEditor() {
@@ -800,6 +837,7 @@
private static final String VPE_EDITOR_CONTEXT = "org.jboss.tools.vpe.editorContext";
private static final String VPE_VISUAL_MAXMIN = "org.jboss.tools.vpe.visual.maxmin";
private static final String VPE_SOURCE_MAXMIN = "org.jboss.tools.vpe.source.maxmin";
+ private static final String VPE_JUMPING = "org.jboss.tools.vpe.jumping";
private IWorkbenchPart fActivePart;
private boolean fIsHandlingActivation = false;
@@ -830,6 +868,8 @@
handlerService.deactivateHandler(sourceActivation);
if (visualActivation != null)
handlerService.deactivateHandler(visualActivation);
+ if (jumpingActivation != null)
+ handlerService.deactivateHandler(jumpingActivation);
}
}
@@ -872,6 +912,9 @@
visualActivation = handlerService.activateHandler(
VPE_VISUAL_MAXMIN,
visualMaxmin);
+ jumpingActivation = handlerService.activateHandler(
+ VPE_JUMPING,
+ jumping);
}
} finally {
fIsHandlingActivation = false;
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 2008-04-15 16:33:53 UTC (rev 7540)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2008-04-15 21:17:42 UTC (rev 7541)
@@ -178,11 +178,13 @@
public void upClicked() {
- upClicked(currentSashInfo);
+ if (currentSashInfo != null)
+ upClicked(currentSashInfo);
}
public void downClicked() {
- downClicked(currentSashInfo);
+ if (currentSashInfo != null)
+ downClicked(currentSashInfo);
}
/**
17 years, 8 months
JBoss Tools SVN: r7540 - trunk/documentation/jboss-tools-docs.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-04-15 12:33:53 -0400 (Tue, 15 Apr 2008)
New Revision: 7540
Modified:
trunk/documentation/jboss-tools-docs/all-guides.xml
Log:
http://jira.jboss.com/jira/browse/JBQA-1524 - index.html was replaced into nightly-docs folder
Modified: trunk/documentation/jboss-tools-docs/all-guides.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/all-guides.xml 2008-04-15 16:26:40 UTC (rev 7539)
+++ trunk/documentation/jboss-tools-docs/all-guides.xml 2008-04-15 16:33:53 UTC (rev 7540)
@@ -23,7 +23,7 @@
<fileSets>
<fileSet>
<directory>.</directory>
- <outputDirectory>/</outputDirectory>
+ <outputDirectory>../</outputDirectory>
<filtered>false</filtered>
<lineEnding>keep</lineEnding>
<includes>
17 years, 8 months
JBoss Tools SVN: r7539 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-04-15 12:26:40 -0400 (Tue, 15 Apr 2008)
New Revision: 7539
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1844 wrong suggestion of codecompletion
issue is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-04-15 16:18:43 UTC (rev 7538)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-04-15 16:26:40 UTC (rev 7539)
@@ -478,11 +478,17 @@
}
public boolean isGetter() {
- return (getName().startsWith("get") && !getName().equals("get")) || getName().startsWith("is");
+ if (null == getReturnType())
+ return false;
+
+ return (((getName().startsWith("get") && !getName().equals("get")) || getName().startsWith("is")) && getNumberOfParameters() == 0);
}
public boolean isSetter() {
- return (getName().startsWith("set") && !getName().equals("set"));
+ if (null != getReturnType())
+ return false;
+
+ return ((getName().startsWith("set") && !getName().equals("set")) && getNumberOfParameters() == 1);
}
@Override
17 years, 8 months
JBoss Tools SVN: r7538 - trunk/documentation/jboss-tools-docs.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-04-15 12:18:43 -0400 (Tue, 15 Apr 2008)
New Revision: 7538
Modified:
trunk/documentation/jboss-tools-docs/pom.xml
Log:
http://jira.jboss.com/jira/browse/JBQA-1524 - destination folder changed to nightly-docs.
Modified: trunk/documentation/jboss-tools-docs/pom.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/pom.xml 2008-04-15 16:17:06 UTC (rev 7537)
+++ trunk/documentation/jboss-tools-docs/pom.xml 2008-04-15 16:18:43 UTC (rev 7538)
@@ -34,7 +34,7 @@
<descriptor>all-guides.xml</descriptor>
</descriptors>
<finalName>en</finalName>
- <outputDirectory>target</outputDirectory>
+ <outputDirectory>nightly-docs</outputDirectory>
<appendAssemblyId>false</appendAssemblyId>
<ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
</configuration>
17 years, 8 months
JBoss Tools SVN: r7537 - in trunk/seam/docs/reference/en: images and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2008-04-15 12:17:06 -0400 (Tue, 15 Apr 2008)
New Revision: 7537
Added:
trunk/seam/docs/reference/en/images/seam_menus_and_actions/
trunk/seam/docs/reference/en/images/seam_menus_and_actions/menus_and_actions1.png
trunk/seam/docs/reference/en/images/seam_menus_and_actions/menus_and_actions2.png
trunk/seam/docs/reference/en/images/seam_menus_and_actions/menus_and_actions3.png
trunk/seam/docs/reference/en/modules/seam_menus_and_actions.xml
Modified:
trunk/seam/docs/reference/en/master.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-296 Seam Menus and Actions chapter added
Added: trunk/seam/docs/reference/en/images/seam_menus_and_actions/menus_and_actions1.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en/images/seam_menus_and_actions/menus_and_actions1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/docs/reference/en/images/seam_menus_and_actions/menus_and_actions2.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en/images/seam_menus_and_actions/menus_and_actions2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/docs/reference/en/images/seam_menus_and_actions/menus_and_actions3.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en/images/seam_menus_and_actions/menus_and_actions3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/seam/docs/reference/en/master.xml
===================================================================
--- trunk/seam/docs/reference/en/master.xml 2008-04-15 15:20:35 UTC (rev 7536)
+++ trunk/seam/docs/reference/en/master.xml 2008-04-15 16:17:06 UTC (rev 7537)
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"../../resources/support/docbook-dtd/docbookx.dtd"
[<!ENTITY intro SYSTEM "modules/intro.xml">
<!ENTITY creating_new_seam SYSTEM "modules/creating_new_seam.xml">
<!ENTITY directory_structure SYSTEM "modules/directory_structure.xml">
+<!ENTITY menus_and_actions SYSTEM "modules/seam_menus_and_actions.xml">
<!ENTITY seam_wizards SYSTEM "modules/seam_wizards.xml">
<!ENTITY generate_entities SYSTEM "modules/generate_entities.xml">
<!ENTITY seam_editors SYSTEM "modules/seam_editors.xml">
@@ -41,6 +42,7 @@
&intro;
&creating_new_seam;
&directory_structure;
+&menus_and_actions;
&seam_wizards;
&generate_entities;
&seam_editors;
Added: trunk/seam/docs/reference/en/modules/seam_menus_and_actions.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/seam_menus_and_actions.xml (rev 0)
+++ trunk/seam/docs/reference/en/modules/seam_menus_and_actions.xml 2008-04-15 16:17:06 UTC (rev 7537)
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="menus_and_actions" xreflabel="menus_and_actions">
+ <?dbhtml filename="seam_menus_and_actions.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>menus</keyword>
+ <keyword>actions</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Seam Menus and Actions</title>
+
+ <para>In this chapter we provide the full description of Seam actions that are available from</para>
+ <itemizedlist>
+ <listitem><para>Menu bar</para></listitem>
+ <listitem><para>Toolbar</para></listitem>
+ <listitem><para>Context menus in views.</para></listitem>
+ </itemizedlist>
+
+
+ <section id="file_menu">
+
+ <title>File Menu Actions</title>
+
+ </section>
+
+ <section id="navigate_menu">
+ <title>Navigate Menu Actions</title>
+
+ <para>The following Seam actions help you to easily navigate through the source code.</para>
+
+ <section id="find_seam_ref_decl">
+
+ <title>Find Seam References/Declarations</title>
+
+
+ <!-- <para><property>Find Seam References/Declarations</property> is available for EL expressions in both .java and .xhtml files.</para>
+ <para>Find Seam references and declarations action works as the normal Eclipse Find References/Declarations via Ctrl+G/Ctrl+Shift+G shortcuts.
+ Furthermore it can be run from the main menu <emphasis><property>Navigate > Find Seam References</property></emphasis>
+ or <emphasis><property>Navigate > Find Seam Declarations</property></emphasis> and from the appropriate toolbar buttons.</para>
+ <para>If you are looking for a reference to a specific class or method and it is referenced in EL or any other Seam configuration the search list will include it.
+ </para>
+
+ -->
+
+ <para>In the main menu bar, click on <emphasis><property>Navigate > Find Seam References</property></emphasis> or <emphasis><property>Find Seam Declarations</property>.</emphasis>
+ These actions are also available from the toolbar, use the appropriate buttons.</para>
+
+ <table>
+ <title>Find Seam References/Declarations actions</title>
+ <tgroup cols="3">
+ <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <colspec colnum="3" colwidth="2*"/>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Function</para>
+ </entry>
+
+ <entry align="center">
+ <para>Keyboard Shortcut</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+
+ <row>
+ <entry>
+ <para><property>Find Seam References</property></para>
+ <para><property>Find Seam Declarations</property></para>
+ </entry>
+
+ <entry>
+ <para>Find all references and declarations to the selected element. It's available for EL expressions in both .java and .xhtml files.
+ Differs from normal Eclipse Find References/Declarations by showing an EL or Seam references in the Search View.
+ </para>
+ </entry>
+
+ <entry>
+ <para>Ctrl+G</para>
+ <para>Ctrl+Shift+G</para>
+ <para>also Ctrl + 1 for .java files</para>
+
+ </entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <para>Look at the screenshot example</para>
+
+ <figure>
+ <title>Find Seam Declaration for "Identity"</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_menus_and_actions/menus_and_actions1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use Ctrl + 1 in .java files</para>
+
+ <figure>
+ <title>Find Seam References for "Identity"</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_menus_and_actions/menus_and_actions2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section>
+ <title>Open Seam Component</title>
+
+ <para>In the main menu bar, click on <emphasis><property>Navigate > Open Seam Component</property>.</emphasis>
+ This dialog is also available from the toolbar.</para>
+
+ <table>
+ <title>Open Seam Components Dialog</title>
+ <tgroup cols="3">
+ <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <colspec colnum="3" colwidth="2*"/>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Function</para>
+ </entry>
+
+ <entry align="center">
+ <para>Keyboard Shortcut</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+
+ <row>
+ <entry>
+ <para><property>Open Seam Components</property></para>
+
+ </entry>
+
+ <entry>
+ <para>Brings up the Open Seam Component dialog to open a component in the editor. The Open Seam Component selection dialog
+ shows all Seam components existing in the workspace. You can search the components via their short, imported or full name.</para>
+ </entry>
+
+ <entry>
+ <para>Ctrl+Shift+Z</para>
+
+ </entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <figure>
+ <title>Open Seam Components Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_menus_and_actions/menus_and_actions3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ </section>
+
+</chapter>
17 years, 8 months
JBoss Tools SVN: r7536 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: search and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-04-15 11:20:35 -0400 (Tue, 15 Apr 2008)
New Revision: 7536
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchQuery.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2057 Search history is spurious in Previous Searches wizard.
Issue is fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java 2008-04-15 14:23:25 UTC (rev 7535)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java 2008-04-15 15:20:35 UTC (rev 7536)
@@ -304,13 +304,6 @@
return new SeamSearchQuery(tokens, sourceFile, scope);
}
- private SeamSearchQuery createQuery(Var var, IFile sourceFile) throws JavaModelException, InterruptedException {
-
- SeamSearchScope scope = new SeamSearchScope(new IFile[] {sourceFile}, getLimitTo());
-
- return new SeamSearchQuery(var, sourceFile, scope);
- }
-
/**
* Returns the limitTo flag. The possible values are:
* - SeamSearchScope.SEARCH_FOR_DECLARATIONS
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchQuery.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchQuery.java 2008-04-15 14:23:25 UTC (rev 7535)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/search/SeamSearchQuery.java 2008-04-15 15:20:35 UTC (rev 7536)
@@ -120,8 +120,6 @@
private List<ELOperandToken> fTokens;
private IJavaElement[] fJavaElements;
private final SeamSearchScope fScope;
- private final String[] fVariables;
- private final Var fVar;
private SeamSearchResult fResult;
private IFile fSourceFile;
private ISearchRequestor fParentRequestor;
@@ -137,8 +135,6 @@
fTokens = tokens;
fJavaElements = null;
fSourceFile = sourceFile;
- fVariables = null;
- fVar = null;
fScope= scope;
}
@@ -153,26 +149,9 @@
fTokens = null;
fJavaElements = javaElements;
fSourceFile = sourceFile;
- fVariables = null;
- fVar = null;
fScope= scope;
}
- /**
- * Constructs Seam search query for a given {@link Var} objects array
- *
- * @param var
- * @param sourceFile
- * @param scope
- */
- public SeamSearchQuery(Var var, IFile sourceFile, SeamSearchScope scope) {
- fTokens = null;
- fJavaElements = null;
- fSourceFile = sourceFile;
- fVariables = null;
- fVar = var;
- fScope= scope;
- }
/**
* Sets up a parent ISearchRequestor
@@ -252,7 +231,6 @@
if (seamProject == null)
return Status.OK_STATUS;
-// List<IJavaElement> elements = engine.getJavaElementsForELOperandTokens(seamProject, fSourceFile, fTokens)
SeamSearchResultCollector collector= new SeamSearchResultCollector(textResult, getParentRequestor());
return SeamSearchEngine.getInstance().search(fScope, collector, fSourceFile, fJavaElements, monitor);
}
@@ -284,17 +262,21 @@
*/
public String getSearchString() {
String searchString = "";
- if (fVariables != null) {
+ if (fJavaElements != null) {
StringBuffer buf= new StringBuffer();
- for (int i= 0; i < fVariables.length; i++) {
+ for (int i= 0; i < fJavaElements.length; i++) {
if (i > 0) {
buf.append(", "); //$NON-NLS-1$
}
- buf.append(fVariables[i]);
+ buf.append(fJavaElements[i]);
}
searchString = buf.toString();
- } else if (fVar != null) {
- searchString = fVar.getName();
+ } else if (fTokens != null) {
+ StringBuffer buf= new StringBuffer();
+ for (int i= 0; i < fTokens.size(); i++) {
+ buf.append(fTokens.get(i).getText());
+ }
+ searchString = buf.toString();
}
return searchString;
}
17 years, 8 months
JBoss Tools SVN: r7535 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-04-15 10:23:25 -0400 (Tue, 15 Apr 2008)
New Revision: 7535
Modified:
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-296 - new info concerning Mapping diagram and Quiry prototyping is added
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-04-15 14:22:54 UTC (rev 7534)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-04-15 14:23:25 UTC (rev 7535)
@@ -1398,7 +1398,7 @@
</figure>
<para>To switch over between the modes use the buttons in the top-right corner of the
- Outline view.</para>
+ <property>Outline view</property>.</para>
<figure>
<title>Navigating in the Graphical Mode</title>
@@ -1437,6 +1437,32 @@
</mediaobject>
</figure>
+ <para>Finally, if you need to have your Diagram exported as <property>
+ <emphasis>.png</emphasis>
+ </property>, <property>
+ <emphasis>.jpeg</emphasis>
+ </property> or <property>
+ <emphasis>.bmp</emphasis>
+ </property>, you should right-click anywhere in the <property>Mapping Diagram
+ editor</property> and select <property><emphasis>Export as Image</emphasis>.</property></para>
+
+ <figure>
+ <title>Mapping Diagram Export</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_e.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see on the figure above, <property>
+ <emphasis>Undo</emphasis>,
+ </property> <property>
+ <emphasis>Redo</emphasis>
+ </property> and <property>
+ <emphasis>Auto layout</emphasis>
+ </property> options are also available through the context menu.</para>
</section>
</section>
@@ -1473,7 +1499,32 @@
</imageobject>
</mediaobject>
</figure>
+ <para>To copy a portion of code from .java file into a HQL or Criteria editor, make use of the
+ Quick Fix option (Ctrl + 1).</para>
+ <figure>
+ <title>Quick Fix Option Demonstration</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_19_b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can also update the original java code according to changes in the HQL or Criteria
+ editor. For that you should save your HQL/Criteria query and submit the replacing in
+ appeared confirmation dialog.</para>
+
+ <figure>
+ <title>Updating Java Code</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_19_c.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
<para>Executing the query is done by clicking the green run button in the toolbar or pressing <emphasis>
<property>Ctrl+Enter</property>
</emphasis>.</para>
@@ -1541,9 +1592,8 @@
</mediaobject>
</figure>
- <para>It also displays the structure of any persistent
- object selected in the <property>Hibernate Query Results View</property>. Editing is not yet
- supported.</para>
+ <para>It also displays the structure of any persistent object selected in the
+ <property>Hibernate Query Results View</property>. Editing is not yet supported.</para>
<figure>
<title>Properties View for Selected Object</title>
17 years, 8 months
JBoss Tools SVN: r7534 - trunk/hibernatetools/docs/reference/en/images/plugins.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-04-15 10:22:54 -0400 (Tue, 15 Apr 2008)
New Revision: 7534
Added:
trunk/hibernatetools/docs/reference/en/images/plugins/plugins_18_e.png
trunk/hibernatetools/docs/reference/en/images/plugins/plugins_19_b.png
trunk/hibernatetools/docs/reference/en/images/plugins/plugins_19_c.png
Log:
http://jira.jboss.com/jira/browse/JBDS-296 - new screens with new features are added
Added: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_18_e.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_18_e.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_19_b.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_19_b.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_19_c.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/reference/en/images/plugins/plugins_19_c.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 8 months