JBoss Tools SVN: r4062 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-08 10:59:55 -0400 (Mon, 08 Oct 2007)
New Revision: 4062
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1040
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-10-08 14:20:49 UTC (rev 4061)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-10-08 14:59:55 UTC (rev 4062)
@@ -12,8 +12,10 @@
package org.jboss.tools.vpe.xulrunner.browser;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
+import java.util.Dictionary;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
@@ -41,6 +43,7 @@
import org.mozilla.interfaces.nsIWebNavigation;
import org.mozilla.interfaces.nsIWebProgress;
import org.mozilla.interfaces.nsIWebProgressListener;
+import org.mozilla.xpcom.GREVersionRange;
import org.mozilla.xpcom.Mozilla;
import org.osgi.framework.Bundle;
@@ -52,8 +55,11 @@
public class XulRunnerBrowser implements nsIWebBrowserChrome,
nsIWebProgressListener, nsITooltipListener {
- private static String XULRUNNER_BUNDLE;
- private static String XULRUNNER_ENTRY = "/xulrunner";
+ private static final String XULRUNNER_LOWER_VERSION = "1.8.1.2";
+ private static final String XULRUNNER_HIGHER_VERSION = "*";
+ // TODO Sergey Vasilyev Think. May be XULRUNNER_BUNDLE shouldn't be final?
+ private static final String XULRUNNER_BUNDLE;
+ private static final String XULRUNNER_ENTRY = "/xulrunner";
// TEMPORARY CODE (@see org.eclipse.swt.browser.Mozilla)
static final String XULRUNNER_INITIALIZED = "org.eclipse.swt.browser.XULRunnerInitialized"; //$NON-NLS-1$
@@ -64,7 +70,7 @@
private static final String PREFERENCE_DISABLEOPENDURINGLOAD = "dom.disable_open_during_load"; //$NON-NLS-1$
private static final String PREFERENCE_DISABLEWINDOWSTATUSCHANGE = "dom.disable_window_status_change"; //$NON-NLS-1$
- private Mozilla mozilla = null;
+ private static final Mozilla mozilla;
private Browser browser = null;
private nsIWebBrowser webBrowser = null;
private long chrome_flags = nsIWebBrowserChrome.CHROME_ALL;
@@ -73,17 +79,13 @@
XULRUNNER_BUNDLE = (new StringBuffer("org.mozilla.xulrunner")) // $NON-NLS-1$
.append(".").append(Platform.getWS()) // $NON-NLS-1$
.append(".").append(Platform.getOS()) // $NON-NLS-1$
+ .append(Platform.OS_MACOSX.equals(Platform.getOS()) ? "" : (new StringBuffer(".")).append(Platform.getOSArch()).toString()) // $NON-NLS-1$ // $NON-NLS-1$
.toString();
- if (!Platform.OS_MACOSX.equals(Platform.getOS())) {
- XULRUNNER_BUNDLE = (new StringBuffer(XULRUNNER_BUNDLE))
- .append(".").append(Platform.getOSArch())
- .toString();
- }
+ mozilla = Mozilla.getInstance();
}
public XulRunnerBrowser(Composite parent) throws XulRunnerException {
- mozilla = Mozilla.getInstance();
String xulRunnerPath = getXulRunnerPath();
Boolean isXulRunnerInitialized = "true".equals(System.getProperty(XULRUNNER_INITIALIZED)); // $NON-NLS-1$
@@ -158,38 +160,61 @@
return XULRUNNER_BUNDLE;
}
- public static void setXulRunnerBundle(String xulRunnerBundle) {
- XulRunnerBrowser.XULRUNNER_BUNDLE = xulRunnerBundle;
- }
-
private String getXulRunnerPath() throws XulRunnerException {
String xulRunnerPath = System.getProperty(XULRUNNER_PATH);
if (xulRunnerPath == null) {
-
- Bundle fragment = Platform.getBundle(getXulRunnerBundle());
- if (fragment == null) {
- throw new XulRunnerException("Bundle " + getXulRunnerBundle() + " is not found.");
+ GREVersionRange[] greRanges = {new GREVersionRange(XULRUNNER_LOWER_VERSION, true, XULRUNNER_HIGHER_VERSION, true)};
+ File xulRunnerFile = null;
+
+ try {
+ xulRunnerFile = Mozilla.getGREPathWithProperties(greRanges, null);
+ } catch (FileNotFoundException fnfe) {
+ // Ignre this exception. Will try to get XULRunner from plugin
}
- URL url = fragment.getEntry(XULRUNNER_ENTRY);
- if (url == null) {
- throw new XulRunnerException("Bundle " + getXulRunnerBundle() + " doesn't contain /xulrunner");
+ if (xulRunnerFile == null
+ || !xulRunnerFile.exists()) {
+ Bundle xulRunnerBundle = Platform.getBundle(getXulRunnerBundle());
+ if (xulRunnerBundle == null) {
+ throw new XulRunnerException("Bundle " + getXulRunnerBundle() + " is not found.");
+ }
+
+ String xulRunnerVersion = (String) xulRunnerBundle.getHeaders().get("Bundle-Version");
+ if (!greRanges[0].check(xulRunnerVersion)) {
+ throw new XulRunnerException("the version of the bundled XULRunner must be >= 1.8.1.2 ");
+ }
+
+
+ URL url = xulRunnerBundle.getEntry(XULRUNNER_ENTRY);
+ if (url == null) {
+ throw new XulRunnerException("Bundle " + getXulRunnerBundle() + " doesn't contain /xulrunner");
+ }
+
+ try {
+ URL url1 = FileLocator.resolve(url);
+ xulRunnerFile = new File(FileLocator.toFileURL(url1).getFile());
+ } catch (IOException ioe) {
+ throw new XulRunnerException("Cannot get path to XULRunner from bundle " + getXulRunnerBundle(), ioe); // $NON-NLS-1$
+ }
}
-
- try {
- URL url1 = FileLocator.resolve(url);
- File file = new File(FileLocator.toFileURL(url1).getFile());
- xulRunnerPath = file.getAbsolutePath();
- System.setProperty(XULRUNNER_PATH, xulRunnerPath);
- } catch (IOException ioe) {
- throw new XulRunnerException(ioe);
- }
+ xulRunnerPath = xulRunnerFile.getAbsolutePath();
+ System.setProperty(XULRUNNER_PATH, xulRunnerPath);
}
+
return xulRunnerPath;
}
+ /**
+ * @return
+ */
+ private File getXULRunnerPathFromMozilla() {
+ File xulRunnerFile = null;
+ return xulRunnerFile;
+ }
+
+
public nsIServiceManager getServiceManager() {
return mozilla.getServiceManager();
}
@@ -307,7 +332,6 @@
}
public void setChromeFlags(long arg0) {
- System.out.println("setChromeFlags");
chrome_flags = arg0;
}
17 years, 3 months
JBoss Tools SVN: r4061 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: asakharov
Date: 2007-10-08 10:20:49 -0400 (Mon, 08 Oct 2007)
New Revision: 4061
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
Fix name <rich:panelMenu/>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-08 14:13:42 UTC (rev 4060)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-08 14:20:49 UTC (rev 4061)
@@ -642,7 +642,7 @@
</vpe:template>
</vpe:tag>
- <vpe:tag name="rich:panelMenu " case-sensitive="yes">
+ <vpe:tag name="rich:panelMenu" case-sensitive="yes">
<vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPanelMenuTemplate">
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes"/>
17 years, 3 months
JBoss Tools SVN: r4060 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: amakhtadui
Date: 2007-10-08 10:13:42 -0400 (Mon, 08 Oct 2007)
New Revision: 4060
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
Fix name rich:panelMenuGroup.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-08 13:56:09 UTC (rev 4059)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-08 14:13:42 UTC (rev 4060)
@@ -635,7 +635,7 @@
</vpe:template>
</vpe:tag>
- <vpe:tag name="rich:panelMenuGroup " case-sensitive="yes">
+ <vpe:tag name="rich:panelMenuGroup" case-sensitive="yes">
<vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPanelMenuGroupTemplate">
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes"/>
17 years, 3 months
JBoss Tools SVN: r4059 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget: field and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-10-08 09:56:09 -0400 (Mon, 08 Oct 2007)
New Revision: 4059
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1031
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2007-10-08 13:29:06 UTC (rev 4058)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2007-10-08 13:56:09 UTC (rev 4059)
@@ -50,6 +50,11 @@
/**
*
*/
+ /*
+ * Starting from 4022 revision it creates standart combo box, if it be necessary
+ * to use custom combo box, use another implementation of this method.
+ * PS. custom combo box looks ugly under mac os.
+ */
public ITaggedFieldEditor createComboEditor(String name, String label,
List values, Object defaultValue) {
TaggedComboFieldEditor editor = new TaggedComboFieldEditor(name,label,values, defaultValue,true);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java 2007-10-08 13:29:06 UTC (rev 4058)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java 2007-10-08 13:56:09 UTC (rev 4059)
@@ -23,11 +23,11 @@
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
@@ -49,10 +49,19 @@
public ComboBoxField(Composite parent,List values, Object value, boolean editable) {
this.values = values;
- CCombo ccombo = new CCombo(parent, SWT.BORDER);
- ccombo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
- ccombo.setEditable(editable);
- comboControl = new ComboViewer(ccombo);
+ /*
+ * Used combo box instead of custom combobox(CCombo),
+ * CCombo looks ugly under MAC OS X
+ */
+ Combo combo;
+ if(editable==true) {
+
+ combo = new Combo(parent, SWT.DROP_DOWN);
+ } else {
+ combo = new Combo(parent, SWT.READ_ONLY);
+ }
+ combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ comboControl = new ComboViewer(combo);
comboControl.setContentProvider(new IStructuredContentProvider() {
public void dispose() {
@@ -68,9 +77,9 @@
});
comboControl.addSelectionChangedListener(this);
- comboControl.getCCombo().addModifyListener(new ModifyListener() {
+ comboControl.getCombo().addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- firePropertyChange(new Object(), comboControl.getCCombo().getText());
+ firePropertyChange(new Object(), comboControl.getCombo().getText());
}});
comboControl.setLabelProvider(new ILabelProvider() {
public void addListener(ILabelProviderListener listener) {
@@ -105,8 +114,8 @@
firePropertyChange("", ((StructuredSelection)event.getSelection()).getFirstElement()); //$NON-NLS-1$
}
- public CCombo getComboControl() {
- return comboControl.getCCombo();
+ public Combo getComboControl() {
+ return comboControl.getCombo();
}
@Override
@@ -116,7 +125,7 @@
public void setValue(Object newValue) {
comboControl.setSelection(new StructuredSelection(newValue));
- comboControl.getCCombo().setText(newValue.toString());
+ comboControl.getCombo().setText(newValue.toString());
}
public void setTags(String[] tags,String value) {
@@ -126,8 +135,13 @@
comboControl.addPostSelectionChangedListener(this);
comboControl.setSelection(new StructuredSelection(value));
}
-
- public void setEditable(boolean ediatble) {
- comboControl.getCCombo().setEditable(ediatble);
+ /*
+ * We can't modify combo, change style of this object,
+ * if we such functionality please use CCombo
+ *
+ */
+ public void setEditable(
+ boolean ediatble) {
+ //comboControl.getCCombo().setEditable(false);
}
}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r4058 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-10-08 09:29:06 -0400 (Mon, 08 Oct 2007)
New Revision: 4058
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber2.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber3.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber4.png
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-160 images are added
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber3.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber4.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/guessnumber4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-08 11:39:15 UTC (rev 4057)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-08 13:29:06 UTC (rev 4058)
@@ -600,7 +600,7 @@
<title>You are asked to enter a number between 0 and 100</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/default.png"/>
+ <imagedata fileref="images/guessnumber.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -608,7 +608,7 @@
<title>Your input is validated and an error message is displayed if invalid input was entered</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/default.png"/>
+ <imagedata fileref="images/guessnumber2.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -617,7 +617,7 @@
<title>After you enter a guess, the application tells you whether a smaller or a larger number should be tried</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/default.png"/>
+ <imagedata fileref="images/guessnumber3.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -626,7 +626,7 @@
<title>Your guess is correct</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/default.png"/>
+ <imagedata fileref="images/guessnumber4.png"/>
</imageobject>
</mediaobject>
</figure>
17 years, 3 months
JBoss Tools SVN: r4057 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-08 07:39:15 -0400 (Mon, 08 Oct 2007)
New Revision: 4057
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/ELExceptionsMatcher.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-989 Provide hyperlinking in console for property/page errors (EL errors)
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/ELExceptionsMatcher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/ELExceptionsMatcher.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/ELExceptionsMatcher.java 2007-10-08 11:39:15 UTC (rev 4057)
@@ -0,0 +1,238 @@
+package org.jboss.ide.eclipse.as.ui.console;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.ISourceLocator;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.console.FileLink;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.IHyperlink;
+import org.eclipse.ui.console.IPatternMatchListenerDelegate;
+import org.eclipse.ui.console.PatternMatchEvent;
+import org.eclipse.ui.console.TextConsole;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.jboss.ide.eclipse.as.ui.Messages;
+
+/**
+ * Pattern matcher to provide linking for
+ * Caused by: Exception: /login.xhtml @23,66 value="#{identity.usernamedoesnotexists}": Property 'usernamedoesnotexists' not found on type org.jboss.seam.security.RuleBasedIdentity
+
+ * @author max
+ *
+ */
+// TODO: add logging, but AS plugins has no logging support ;(
+public class ELExceptionsMatcher implements IPatternMatchListenerDelegate {
+
+ private TextConsole console;
+
+ static final Pattern resourceLocationPattern = Pattern.compile("Exception: (.*) @(\\d+),(\\d+)");
+
+ public void connect(TextConsole console) {
+ this.console = console;
+ }
+
+ public void disconnect() {
+ console = null;
+ }
+
+
+ public void matchFound(PatternMatchEvent event) {
+
+ String line = null;
+ try {
+ line = console.getDocument().get(event.getOffset(),
+ event.getLength());
+ } catch (BadLocationException e1) {
+ return;
+ }
+
+
+
+ Matcher matcher;
+ synchronized (resourceLocationPattern) {
+ matcher = resourceLocationPattern.matcher(line);
+ }
+
+ String resource = null, lineNum, columnNum = null;
+ int resourceStart = -1, resourceEnd = -1, columnEnd = -1;
+ if (matcher.find()) {
+ resource = matcher.group(1);
+ resourceStart = matcher.start(1);
+ resourceEnd = matcher.end(1);
+
+ lineNum = matcher.group(2);
+ columnNum = matcher.group(3);
+ columnEnd = matcher.end(3);
+ CustomFileLink customFileLink = new CustomFileLink(console,
+ resource, lineNum);
+ try {
+ console.addHyperlink(customFileLink, event.getOffset()+resourceStart, columnEnd
+ - resourceStart);
+ } catch (BadLocationException e) {
+ // Can't do anything
+ return;
+ }
+ }
+
+ }
+
+ /**
+ * Custom link to only do possible expensive lookups when it is actually requested by the user.
+ * @author max
+ *
+ */
+ static class CustomFileLink implements IHyperlink {
+
+ private TextConsole console;
+ private final String resource;
+ private final String lineNum;
+
+ CustomFileLink(TextConsole console, String resourceName, String lineNum) {
+ this.console = console;
+ this.resource = resourceName;
+ this.lineNum = lineNum;
+ }
+
+ private ILaunch getLaunch() {
+ IProcess process = (IProcess) console
+ .getAttribute(IDebugUIConstants.ATTR_CONSOLE_PROCESS);
+ if (process != null) {
+ return process.getLaunch();
+ }
+ return null;
+ }
+
+ public void linkActivated() {
+ ILaunch launch = getLaunch();
+ if (launch != null) {
+ FileLink launchSpecificFile = getLaunchSpecificFile(launch);
+ if (launchSpecificFile != null) {
+ launchSpecificFile.linkActivated();
+ return;
+ }
+ } else { // no launch associated, search recursively all
+ // projects.
+ FileLink launchSpecificFile = findFileInWorkspace();
+ if (launchSpecificFile != null) {
+ launchSpecificFile.linkActivated();
+ return;
+ }
+ }
+
+ // Nothing found, lets inform the user about that.
+ MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Resource not found", "Could not locate '" + resource + "' in workspace." );
+
+ }
+
+ private FileLink findFileInWorkspace() {
+ final String simpleName = resource.substring(resource
+ .lastIndexOf("/") + 1);
+
+ IPath path = new Path(resource);
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
+ .getProjects();
+
+ final String finalResource = resource;
+
+ final List<IFile> files = new ArrayList<IFile>();
+ for (int i = 0; i < projects.length && files.isEmpty(); i++) {
+ IProject project = projects[i];
+ try {
+ project.accept(new IResourceProxyVisitor() {
+
+ public boolean visit(IResourceProxy proxy)
+ throws CoreException {
+ if (proxy.requestResource().getType() != IResource.FILE) {
+ return true;
+ }
+ String n = proxy.getName();
+
+ if (n.equals(simpleName)) {
+ IPath requestFullPath = proxy.requestFullPath();
+ if (requestFullPath.toOSString().endsWith(
+ finalResource)) {
+ files.add((IFile) proxy.requestResource());
+ }
+ }
+ return true;
+ }
+
+ }, 0);
+ } catch (CoreException e1) {
+ //
+
+ }
+ }
+
+ if (files.size() != 0) {
+ IFile file = (IFile) files.get(0);
+ if (file != null && file.exists()) {
+ FileLink link = new FileLink(file, null, -1, -1, Integer
+ .parseInt(lineNum));
+ return link;
+ }
+ }
+
+ return null;
+ }
+
+ private FileLink getLaunchSpecificFile(ILaunch launch) {
+ try {
+ Object resolveSourceElement = resolveSourceElement(resource,
+ launch);
+ if (resolveSourceElement != null
+ && resolveSourceElement instanceof IFile) {
+ IFile file = (IFile) resolveSourceElement;
+ FileLink link = new FileLink(file, null, -1, -1, Integer
+ .parseInt(lineNum));
+ return link;
+ }
+ } catch (CoreException e) {
+ // resolveSourceElement somehow failed
+ }
+
+ return null;
+ }
+
+ /** Try and locate a file via the launch support for sourcelookup */
+ private static Object resolveSourceElement(Object object, ILaunch launch)
+ throws CoreException {
+ ISourceLocator sourceLocator = launch.getSourceLocator();
+ if (sourceLocator instanceof ISourceLookupDirector) {
+ ISourceLookupDirector director = (ISourceLookupDirector) sourceLocator;
+ Object[] objects = director.findSourceElements(object);
+ if (objects.length > 0) {
+ return objects[0];
+ }
+ }
+ return null;
+ }
+
+ public void linkEntered() {
+ // noop
+ }
+
+ public void linkExited() {
+ // noop
+ }
+
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-10-08 10:52:46 UTC (rev 4056)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-10-08 11:39:15 UTC (rev 4057)
@@ -311,6 +311,21 @@
</action>
</objectContribution>
</extension>
+ <extension
+ point="org.eclipse.ui.console.consolePatternMatchListeners">
+ <consolePatternMatchListener
+ class="org.jboss.ide.eclipse.as.ui.console.ELExceptionsMatcher"
+ id="org.jboss.ide.eclipse.as.ui.console.ELExceptionsMatcher"
+ regex="Exception.*: .* @[0-9]+,[0-9]+ ">
+ <enablement>
+ <or>
+ <test property="org.eclipse.ui.console.consoleTypeTest" value="javaStackTraceConsole"/>
+ <test property="org.eclipse.debug.ui.processTypeTest" value="java"/>
+ <test property="org.eclipse.debug.ui.processTypeTest" value="org.eclipse.ant.ui.antProcess"/>
+ </or>
+ </enablement>
+ </consolePatternMatchListener>
+ </extension>
</plugin>
17 years, 3 months
JBoss Tools SVN: r4056 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: images and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-10-08 06:52:46 -0400 (Mon, 08 Oct 2007)
New Revision: 4056
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newseamproj23.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml
Log:
minor correcction
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newseamproj23.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml 2007-10-08 10:43:38 UTC (rev 4055)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/master.xml 2007-10-08 10:52:46 UTC (rev 4056)
@@ -22,7 +22,7 @@
<holder>Red Hat</holder>
</copyright>
<releaseinfo>
-<para>Version: 1.0.0.beta1</para>
+<para>Version: 1.0.0.beta2</para>
<para>Note: This document is a work in progress and hence some sections might be incomplete and screenshots not 100% accurate.</para></releaseinfo>
</bookinfo>
17 years, 3 months
JBoss Tools SVN: r4055 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-10-08 06:43:38 -0400 (Mon, 08 Oct 2007)
New Revision: 4055
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-160 minor changes
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-08 09:31:27 UTC (rev 4054)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-08 10:43:38 UTC (rev 4055)
@@ -27,12 +27,8 @@
<imagedata fileref="images/newrad1.png"/>
</imageobject>
</mediaobject>
-</figure>
+</figure></para></listitem>
-<para>Put "GuessNumber" as a project name, in "JSF Environment" drop down list choose JSF 1.2.</para>
-<para>Leave everything else as it is and click <emphasis><property>Finish</property></emphasis>.</para>
-<para>The project will appear in Project Explorer and Web Projects Views. As you can see Red Had Developer Studio has created for you the whole skeleton for the project with all needed libraries, faces-config.xml and web.xml files.</para>
-</para></listitem>
<listitem><para>Put "GuessNumber" as a project name, in "JSF Environment" drop down list choose JSF 1.2.</para></listitem>
<listitem><para>Leave everything else as it is and click Finish</para></listitem>
</itemizedlist>
@@ -486,7 +482,7 @@
<itemizedlist>
<listitem><para>Click <emphasis><property>Ok</property></emphasis>, then click <emphasis><property>Finish</property></emphasis></para></listitem>
<listitem><para>Go to Source mode</para></listitem>
-<listitem><para>Add the validation attribute to <emphasis role="bold"><property><f:validateLongRange></property></emphasis> for your input validation</para></listitem></itemizedlist>
+<listitem><para>Add the validation attribute to <emphasis role="bold"><property><f:validateLongRange></property></emphasis> for user input validation</para></listitem></itemizedlist>
<programlisting role="XML"><![CDATA[<h:inputText id="userNumber" value="#{NumberBean.userNumber}" required="true">
<f:validateLongRange minimum="0" maximum="100"/>
</h:inputText>
@@ -589,14 +585,13 @@
</html>
]]></programlisting>
-<para>Note the <emphasis>.jsf</emphasis> extension of a page. It means that we trigger the JSF controller servlet to handle the page according the servlet mapping in faces-config.xml file.</para>
+<para>Note the <emphasis>.jsf</emphasis> extension of a page. It means that we trigger the JSF controller servlet to handle the page according the servlet mapping in the faces-config.xml file.</para>
</section>
<section id="RunningTheApplication33">
<?dbhtml filename="RunningTheApplication33.html"?>
<title>Running the Application</title>
<para>Everything is ready to run the application.</para>
<itemizedlist>
-<listitem><para>Start up JBoss server by clicking on the Start icon in JBoss Server view. (If JBoss is already running, stop it by clicking on the red icon and then start it again. After the messages in the Console tabbed view stops scrolling, JBoss is available.</para></listitem>
<listitem><para>Start up JBoss server by clicking on the Start icon in JBoss Server view. (If JBoss is already running, stop it by clicking on the red icon and then start it again. After the messages in the Console tabbed view stop scrolling, JBoss is available</para></listitem>
<listitem><para>Click on the Red Hat run icon in the toolbar</para></listitem>
<listitem><para>Play with the application by entering correct as well as incorrect values</para></listitem>
17 years, 3 months
JBoss Tools SVN: r4054 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-08 05:31:27 -0400 (Mon, 08 Oct 2007)
New Revision: 4054
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
Log:
The throwing of XulRunnerException was added in place where NPE is possible.
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-10-08 09:14:30 UTC (rev 4053)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-10-08 09:31:27 UTC (rev 4054)
@@ -97,6 +97,9 @@
browser = new Browser(parent, SWT.MOZILLA);
webBrowser = (nsIWebBrowser) browser.getWebBrowser();
+ if (webBrowser == null) {
+ throw new XulRunnerException("nsIWebBrowser is not available"); // $NON-NLS-1$
+ }
setBoolRootPref(PREFERENCE_DISABLEOPENDURINGLOAD, true);
setBoolRootPref(PREFERENCE_DISABLEWINDOWSTATUSCHANGE, true);
17 years, 3 months
JBoss Tools SVN: r4053 - in branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner: browser and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-08 05:14:30 -0400 (Mon, 08 Oct 2007)
New Revision: 4053
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
Log:
NPE and non localized string fix.
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2007-10-08 08:36:12 UTC (rev 4052)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2007-10-08 09:14:30 UTC (rev 4053)
@@ -11,14 +11,14 @@
public class BrowserPlugin extends BaseUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.vpe.xulrunner";
+ public static final String PLUGIN_ID = "org.jboss.tools.vpe.xulrunner"; // $NON-NLS-1$
public static final boolean DEBUG_BROWSERSTART;
// The shared instance
private static BrowserPlugin plugin;
static {
- DEBUG_BROWSERSTART = "true".equals(Platform.getDebugOption(PLUGIN_ID + "/debug/browser_start"));
+ DEBUG_BROWSERSTART = "true".equals(Platform.getDebugOption(PLUGIN_ID + "/debug/browser_start")); // $NON-NLS-1$ // $NON-NLS-1$
}
/**
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-10-08 08:36:12 UTC (rev 4052)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-10-08 09:14:30 UTC (rev 4053)
@@ -96,6 +96,8 @@
browser = new Browser(parent, SWT.MOZILLA);
+ webBrowser = (nsIWebBrowser) browser.getWebBrowser();
+
setBoolRootPref(PREFERENCE_DISABLEOPENDURINGLOAD, true);
setBoolRootPref(PREFERENCE_DISABLEWINDOWSTATUSCHANGE, true);
17 years, 3 months