JBoss Tools SVN: r39956 - trunk/examples/plugins/org.jboss.tools.project.examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-04-01 10:27:37 -0400 (Sun, 01 Apr 2012)
New Revision: 39956
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
Log:
JBIDE-11443 - AS 7.1.1 added into downloadable Runtimes list
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2012-04-01 10:44:22 UTC (rev 39955)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2012-04-01 14:27:37 UTC (rev 39956)
@@ -91,6 +91,13 @@
<extension
point="org.jboss.tools.project.examples.downloadruntimes">
<runtime
+ id="org.jboss.tools.runtime.core.as.711"
+ name="JBoss AS 7.1.1 Certified Java EE 6 Full Profile"
+ version="7.1.1.Final"
+ size="127MB"
+ url="http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1..."
+ disclaimer="true"/>
+ <runtime
id="org.jboss.tools.runtime.core.as.710"
name="JBoss AS 7.1.0 Certified Java EE 6 Full Profile"
version="7.1.0.Final"
12 years, 9 months
JBoss Tools SVN: r39955 - trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-04-01 06:44:22 -0400 (Sun, 01 Apr 2012)
New Revision: 39955
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/OpenFileCallback.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java
Log:
https://issues.jboss.org/browse/JBIDE-11179 : BrowserSim - add a view source option
- added exceptions logging
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/OpenFileCallback.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/OpenFileCallback.java 2012-04-01 10:29:26 UTC (rev 39954)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/OpenFileCallback.java 2012-04-01 10:44:22 UTC (rev 39955)
@@ -11,6 +11,7 @@
package org.jboss.tools.vpe.browsersim.eclipse.callbacks;
import java.io.File;
+import java.io.FileNotFoundException;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
@@ -20,6 +21,7 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.vpe.browsersim.eclipse.Activator;
import org.jboss.tools.vpe.browsersim.eclipse.util.BrowserSimLauncher;
import org.jboss.tools.vpe.browsersim.eclipse.util.TransparentReader;
@@ -49,7 +51,8 @@
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
- File fileToOpen = new File(lastString.substring(OPEN_FILE_COMMAND.length()));
+ String fileNameToOpen = lastString.substring(OPEN_FILE_COMMAND.length());
+ File fileToOpen = new File(fileNameToOpen);
if (fileToOpen.exists() && fileToOpen.isFile()) {
IFileStore fileStore = EFS.getLocalFileSystem().getStore(fileToOpen.toURI());
@@ -60,13 +63,15 @@
try {
IDE.openEditorOnFileStore(page, fileStore);
} catch (PartInitException e) {
- //TODO: put exception handler
+ Activator.logError(e.getMessage(), e);
}
} else {
- // TODO: log exception
+ Exception e = new Exception("Cannot obtain workbench page");
+ Activator.logError(e.getMessage(), e);
}
} else {
- //TODO: Do something if the file does not exist
+ FileNotFoundException e = new FileNotFoundException("Cannot open file: " + fileNameToOpen);
+ Activator.logError(e.getMessage(), e);
}
}
});
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java 2012-04-01 10:29:26 UTC (rev 39954)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java 2012-04-01 10:44:22 UTC (rev 39955)
@@ -32,6 +32,7 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.texteditor.ITextEditor;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.browsersim.eclipse.Activator;
import org.jboss.tools.vpe.browsersim.eclipse.util.BrowserSimLauncher;
import org.jboss.tools.vpe.browsersim.eclipse.util.TransparentReader;
@@ -128,10 +129,11 @@
editor.doSave(null); // reset resource-changed marker
}
} catch (PartInitException e) {
- // TODO: log exception
+ Activator.logError(e.getMessage(), e);
}
} else {
- // TODO: log exception
+ Exception e = new Exception("Cannot obtain workbench page");
+ Activator.logError(e.getMessage(), e);
}
}
}
12 years, 9 months
JBoss Tools SVN: r39954 - in trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-04-01 06:29:26 -0400 (Sun, 01 Apr 2012)
New Revision: 39954
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/TransparentReader.java
Log:
https://issues.jboss.org/browse/JBIDE-11179 : BrowserSim - add a view source option
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java 2012-04-01 10:26:24 UTC (rev 39953)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java 2012-04-01 10:29:26 UTC (rev 39954)
@@ -30,7 +30,6 @@
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.texteditor.ITextEditor;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.browsersim.eclipse.util.BrowserSimLauncher;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/TransparentReader.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/TransparentReader.java 2012-04-01 10:26:24 UTC (rev 39953)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/TransparentReader.java 2012-04-01 10:29:26 UTC (rev 39954)
@@ -29,9 +29,9 @@
public String readLine(boolean forwardToConcole) throws IOException {
StringBuilder nextLine = new StringBuilder();
- int nextCharInt;
+ int nextCharInt = -1;
boolean eolReached = false;
- while ((nextCharInt = reader.read()) >= 0 && !eolReached) {
+ while (!eolReached && (nextCharInt = reader.read()) >= 0) {
char nextChar = (char) nextCharInt;
if (forwardToConcole) {
output.print(nextChar);
12 years, 9 months
JBoss Tools SVN: r39953 - in trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse: src/org/jboss/tools/vpe/browsersim/eclipse/callbacks and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-04-01 06:26:24 -0400 (Sun, 01 Apr 2012)
New Revision: 39953
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java
Log:
https://issues.jboss.org/browse/JBIDE-11179 : BrowserSim - add a view source option
- added support of VPE
- NPE fixes
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF 2012-04-01 10:06:20 UTC (rev 39952)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/META-INF/MANIFEST.MF 2012-04-01 10:26:24 UTC (rev 39953)
@@ -12,7 +12,11 @@
org.eclipse.ui.editors,
org.eclipse.ui.ide,
org.eclipse.ui.browser,
- org.eclipse.core.filesystem
+ org.eclipse.core.filesystem,
+ org.jboss.tools.jst.jsp;bundle-version="3.3.0";resolution:=optional,
+ org.eclipse.wst.sse.ui;resolution:=optional,
+ org.jboss.tools.common.text.ext;bundle-version="3.3.0";resolution:=optional,
+ org.jboss.tools.jst.web;bundle-version="3.3.0";resolution:=optional
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: JBoss by Red Hat
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java 2012-04-01 10:06:20 UTC (rev 39952)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java 2012-04-01 10:26:24 UTC (rev 39953)
@@ -23,13 +23,16 @@
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPersistableElement;
import org.eclipse.ui.IStorageEditorInput;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.texteditor.ITextEditor;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.browsersim.eclipse.util.BrowserSimLauncher;
import org.jboss.tools.vpe.browsersim.eclipse.util.TransparentReader;
@@ -85,7 +88,7 @@
IStorage storage = new StringStorage("", // see the long comment below to know why an empty storage is created
"view-source.html"); // .html extension is needed to enable code highlighting in the WTP HTML editor
IStorageEditorInput input = new StringInput(storage, name, toolTip);
- ITextEditor editor = (ITextEditor) page.openEditor(input, editorId);
+ IEditorPart editor = page.openEditor(input, editorId);
/* We change content of the editor AFTER the editor is created
* as a workaround for the following WTP bug.
@@ -94,9 +97,37 @@
* is created and freezes UI.
* See http://www.eclipse.org/forums/index.php/m/639937/
*/
- IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput());
- document.set(content);
- editor.doSave(null); // reset resource-changed marker
+ IDocument doc = null;
+
+ // this checking is needed to do not load jst.jsp plug-ins if it is unnecessary
+ if ("org.jboss.tools.jst.jsp.jspeditor.HTMLTextEditor".equals(editorId)) {
+ try {
+ if (editor instanceof JSPMultiPageEditor) {
+ JSPMultiPageEditor multiPageEditor = (JSPMultiPageEditor) editor;
+ doc = multiPageEditor.getSourceEditor().getTextViewer().getDocument();
+ }
+ } catch (NoClassDefFoundError e1) {
+ // this is OK - there are some optional dependencies
+ }
+ }
+
+ if (doc == null) {
+ ITextEditor textEditor = null;
+ if (editor instanceof ITextEditor) {
+ textEditor = (ITextEditor) editor;
+ } else {
+ textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
+ }
+
+ if (textEditor != null) {
+ doc = textEditor.getDocumentProvider().getDocument(input);
+ }
+ }
+
+ if (doc != null) {
+ doc.set(content);
+ editor.doSave(null); // reset resource-changed marker
+ }
} catch (PartInitException e) {
// TODO: log exception
}
12 years, 9 months
JBoss Tools SVN: r39952 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-04-01 06:06:20 -0400 (Sun, 01 Apr 2012)
New Revision: 39952
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/StorageRevisionEditorInputAdapter.java
Log:
https://issues.jboss.org/browse/JBIDE-11179 : BrowserSim - add a view source option
- fixed NPE for in-memory storage (storage without path)
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/StorageRevisionEditorInputAdapter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/StorageRevisionEditorInputAdapter.java 2012-03-31 03:33:13 UTC (rev 39951)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/StorageRevisionEditorInputAdapter.java 2012-04-01 10:06:20 UTC (rev 39952)
@@ -64,7 +64,7 @@
}
public String getName() {
- return storage.getFullPath().toString();
+ return storage.getFullPath() != null ? storage.getFullPath().toString() : null;
}
public boolean isReadOnly() {
12 years, 9 months