Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Several bug fixes #30

Merged
merged 5 commits into from

2 participants

@serras
  • Happy and Alex editors had some problems with ProcessRunner. I've fixed them to work again.
  • I found a way to add dependency on other features, so now when installing EclipseFP, it will automatically install JDT and WST if not installed before.
  • In scion-browser I dropped the dependency on MissingH, so it can be built in 7.2.1. The new scion-browser version is bundled.
  • Fixed a bug where editors for web-things (like Hamlet or Heist templates) couldn't open correctly. This reintroduces the dependency on WST to build.
@JPMoresmau JPMoresmau merged commit 4e8ae01 into JPMoresmau:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 117 additions and 50 deletions.
  1. +12 −0 net.sf.eclipsefp.haskell-feature/feature.xml
  2. +1 −1  net.sf.eclipsefp.haskell.browser/src/net/sf/eclipsefp/haskell/browser/BrowserPlugin.java
  3. BIN  net.sf.eclipsefp.haskell.browser/src/net/sf/eclipsefp/haskell/browser/scion-browser-0.1.1.zip
  4. BIN  net.sf.eclipsefp.haskell.browser/src/net/sf/eclipsefp/haskell/browser/scion-browser-0.1.zip
  5. +1 −1  net.sf.eclipsefp.haskell.core/src/net/sf/eclipsefp/haskell/core/partitioned/runner/AlexRunner.java
  6. +1 −1  net.sf.eclipsefp.haskell.core/src/net/sf/eclipsefp/haskell/core/partitioned/runner/HappyRunner.java
  7. +35 −30 net.sf.eclipsefp.haskell.core/src/net/sf/eclipsefp/haskell/core/partitioned/runner/OutputParser.java
  8. +1 −1  net.sf.eclipsefp.haskell.core/src/net/sf/eclipsefp/haskell/core/partitioned/runner/UuagcRunner.java
  9. +7 −1 net.sf.eclipsefp.haskell.ui/META-INF/MANIFEST.MF
  10. +6 −6 net.sf.eclipsefp.haskell.ui/plugin.xml
  11. +7 −0 net.sf.eclipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/CassiusEditor.java
  12. +7 −0 net.sf.eclipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/HamletEditor.java
  13. +7 −0 net.sf.eclipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/HeistXHTMLTemplateEditor.java
  14. +7 −0 net.sf.eclipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/HeistXMLTemplateEditor.java
  15. +7 −0 net.sf.eclipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/JuliusEditor.java
  16. +7 −0 net.sf.eclipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/LuciusEditor.java
  17. +11 −9 net.sf.eclipsefp.haskell.util/src/net/sf/eclipsefp/haskell/util/ProcessRunner.java
View
12 net.sf.eclipsefp.haskell-feature/feature.xml
@@ -23,6 +23,18 @@ license. A copy of the BSD3 license is provided with this content
and is also available at http://github.com/JPMoresmau/scion/raw/master/docs/LICENSE
</license>
+ <includes
+ id="org.eclipse.birt.chart"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.jdt"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.wst.web_ui.feature"
+ version="0.0.0"/>
+
<requires>
<import plugin="net.sf.eclipsefp.haskell.browser" version="0.0.1" match="greaterOrEqual"/>
<import plugin="net.sf.eclipsefp.haskell.compat" version="2.0.2" match="greaterOrEqual"/>
View
2  net.sf.eclipsefp.haskell.browser/src/net/sf/eclipsefp/haskell/browser/BrowserPlugin.java
@@ -28,7 +28,7 @@
public class BrowserPlugin extends AbstractUIPlugin implements IDatabaseLoadedListener, IHoogleLoadedListener {
// The plug-in ID
public static final String PLUGIN_ID = "net.sf.eclipsefp.haskell.browser"; //$NON-NLS-1$
- public static final String BROWSER_VERSION = "0.1";
+ public static final String BROWSER_VERSION = "0.1.1";
public static final String DIST_FOLDER = ".dist-scion-browser";
/** The plugin's resource bundle. */
View
BIN  ...sf.eclipsefp.haskell.browser/src/net/sf/eclipsefp/haskell/browser/scion-browser-0.1.1.zip
Binary file not shown
View
BIN  net.sf.eclipsefp.haskell.browser/src/net/sf/eclipsefp/haskell/browser/scion-browser-0.1.zip
Binary file not shown
View
2  ...lipsefp.haskell.core/src/net/sf/eclipsefp/haskell/core/partitioned/runner/AlexRunner.java
@@ -16,7 +16,7 @@ public String getExecutableName() {
@Override
public StringWriter selectStream( final StringWriter out, final StringWriter err ) {
- return err;
+ return out;
}
}
View
2  ...ipsefp.haskell.core/src/net/sf/eclipsefp/haskell/core/partitioned/runner/HappyRunner.java
@@ -16,7 +16,7 @@ public String getExecutableName() {
@Override
public StringWriter selectStream( final StringWriter out, final StringWriter err ) {
- return err;
+ return out;
}
}
View
65 ...psefp.haskell.core/src/net/sf/eclipsefp/haskell/core/partitioned/runner/OutputParser.java
@@ -15,36 +15,41 @@
String[] lines = s.split("[\r\n]+"); //$NON-NLS-1$
for (String line : lines) {
- int parts = line.indexOf(": "); //$NON-NLS-1$
-
- String file = line.substring(0, parts);
- String msg = line.substring(parts + 2).trim();
-
- String[] fileParts = file.split(":"); //$NON-NLS-1$
- String fname;
- int lno, cno;
-
- if (fileParts.length == 4) {
- // We have a Windows path + line + column
- fname = fileParts[0] + ":" + fileParts[1]; //$NON-NLS-1$
- lno = Integer.parseInt(fileParts[2]);
- cno = Integer.parseInt(fileParts[3]);
- } else if (fileParts.length == 3) {
- // Try to get it as Unix file + line + column
- try {
- fname = fileParts[0];
- lno = Integer.parseInt(fileParts[1]);
- cno = Integer.parseInt(fileParts[2]);
- } catch (NumberFormatException e) {
- fname = fileParts[0] + ":" + fileParts[1]; //$NON-NLS-1$
- lno = Integer.parseInt(fileParts[2]);
- cno = 0;
- }
- } else {
- fname = fileParts[0];
- lno = Integer.parseInt(fileParts[1]);
- cno = 0;
- }
+ String[] fileParts = line.split(":"); //$NON-NLS-1$
+
+ int current;
+ String fname = fileParts[0];
+ int lno, cno;
+ try {
+ // Try to find a line number
+ lno = Integer.parseInt( fileParts[1].trim() );
+ current = 1;
+ } catch (NumberFormatException e) {
+ // If not, it is a Windows path
+ fname = fname + ":" + fileParts[1]; //$NON-NLS-1$
+ current = 2;
+ }
+
+ // Parse line number
+ lno = Integer.parseInt( fileParts[current].trim() );
+ current++;
+
+ // Try to parse a column
+ try {
+ cno = Integer.parseInt( fileParts[current].trim() );
+ current++;
+ } catch (NumberFormatException e) {
+ cno = 0;
+ }
+
+ // The rest is the message
+ String msg = ""; //$NON-NLS-1$
+ for (int j = current; j < fileParts.length; j++) {
+ if (msg.length() > 0) {
+ msg += ":"; //$NON-NLS-1$
+ }
+ msg += fileParts[j];
+ }
r.add(new ProcessorError(fname, lno, cno, msg));
}
View
2  ...ipsefp.haskell.core/src/net/sf/eclipsefp/haskell/core/partitioned/runner/UuagcRunner.java
@@ -25,7 +25,7 @@ public UuagcRunner( final IProject project ) {
public StringWriter selectStream( final StringWriter out,
final StringWriter err ) {
- return err;
+ return out;
}
public String[] getExecutableAndArgs( final IResource resource ) {
View
8 net.sf.eclipsefp.haskell.ui/META-INF/MANIFEST.MF
@@ -23,7 +23,13 @@ Require-Bundle: net.sf.eclipsefp.haskell.core,
net.sf.eclipsefp.haskell.debug.core;bundle-version="2.0.0",
net.sf.eclipsefp.haskell.browser;bundle-version="0.0.1",
org.apache.ant,
- org.eclipse.ui.editors
+ org.eclipse.ui.editors,
+ org.eclipse.wst.sse.ui;bundle-version="1.3.0",
+ org.eclipse.wst.common.ui;bundle-version="1.1.0",
+ org.eclipse.wst.css.ui;bundle-version="1.0.0",
+ org.eclipse.wst.jsdt.ui;bundle-version="1.1.0",
+ org.eclipse.wst.web.ui;bundle-version="1.1.0",
+ org.eclipse.wst.xml.ui;bundle-version="1.1.0"
Bundle-ManifestVersion: 2
Export-Package: net.sf.eclipsefp.common.ui.dialog;uses:="org.eclipse.swt.widgets",
net.sf.eclipsefp.common.ui.preferences;
View
12 net.sf.eclipsefp.haskell.ui/plugin.xml
@@ -1083,7 +1083,7 @@
</contentTypeBinding>
</editor>
<editor
- class="org.eclipse.wst.sse.ui.StructuredTextEditor"
+ class="net.sf.eclipsefp.haskell.ui.internal.web.editors.HeistXHTMLTemplateEditor"
contributorClass="org.eclipse.wst.html.ui.internal.edit.ui.ActionContributorHTML"
extensions="tpl"
id="net.sf.eclipsefp.haskell.ui.internal.web.editors.HeistXHTMLTemplateEditor"
@@ -1093,7 +1093,7 @@
</contentTypeBinding>
</editor>
<editor
- class="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart"
+ class="net.sf.eclipsefp.haskell.ui.internal.web.editors.HeistXMLTemplateEditor"
contributorClass="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorActionBarContributor"
extensions="xtpl"
id="net.sf.eclipsefp.haskell.ui.internal.web.editors.HeistXMLTemplateEditor"
@@ -1103,7 +1103,7 @@
</contentTypeBinding>
</editor>
<editor
- class="org.eclipse.wst.sse.ui.StructuredTextEditor"
+ class="net.sf.eclipsefp.haskell.ui.internal.web.editors.CassiusEditor"
contributorClass="org.eclipse.wst.css.ui.internal.ActionContributorCSS"
extensions="cassius"
id="net.sf.eclipsefp.haskell.ui.internal.web.editors.CassiusEditor"
@@ -1113,7 +1113,7 @@
</contentTypeBinding>
</editor>
<editor
- class="org.eclipse.wst.sse.ui.StructuredTextEditor"
+ class="net.sf.eclipsefp.haskell.ui.internal.web.editors.HamletEditor"
contributorClass="org.eclipse.wst.html.ui.internal.edit.ui.ActionContributorHTML"
extensions="hamlet"
id="net.sf.eclipsefp.haskell.ui.internal.web.editors.HamletEditor"
@@ -1123,7 +1123,7 @@
</contentTypeBinding>
</editor>
<editor
- class="org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitEditor"
+ class="net.sf.eclipsefp.haskell.ui.internal.web.editors.JuliusEditor"
contributorClass="org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitEditorActionContributor"
extensions="julius"
id="net.sf.eclipsefp.haskell.ui.internal.web.editors.JuliusEditor"
@@ -1133,7 +1133,7 @@
</contentTypeBinding>
</editor>
<editor
- class="org.eclipse.wst.sse.ui.StructuredTextEditor"
+ class="net.sf.eclipsefp.haskell.ui.internal.web.editors.LuciusEditor"
contributorClass="org.eclipse.wst.css.ui.internal.ActionContributorCSS"
extensions="lucius"
id="net.sf.eclipsefp.haskell.ui.internal.web.editors.LuciusEditor"
View
7 ...ipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/CassiusEditor.java
@@ -0,0 +1,7 @@
+package net.sf.eclipsefp.haskell.ui.internal.web.editors;
+
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+public class CassiusEditor extends StructuredTextEditor {
+ // Nothing
+}
View
7 ...lipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/HamletEditor.java
@@ -0,0 +1,7 @@
+package net.sf.eclipsefp.haskell.ui.internal.web.editors;
+
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+public class HamletEditor extends StructuredTextEditor {
+ // Nothing
+}
View
7 ...ell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/HeistXHTMLTemplateEditor.java
@@ -0,0 +1,7 @@
+package net.sf.eclipsefp.haskell.ui.internal.web.editors;
+
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+public class HeistXHTMLTemplateEditor extends StructuredTextEditor {
+ // Nothing
+}
View
7 ...skell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/HeistXMLTemplateEditor.java
@@ -0,0 +1,7 @@
+package net.sf.eclipsefp.haskell.ui.internal.web.editors;
+
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+public class HeistXMLTemplateEditor extends StructuredTextEditor {
+ // Nothing
+}
View
7 ...lipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/JuliusEditor.java
@@ -0,0 +1,7 @@
+package net.sf.eclipsefp.haskell.ui.internal.web.editors;
+
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+public class JuliusEditor extends StructuredTextEditor {
+ // Nothing
+}
View
7 ...lipsefp.haskell.ui/src/net/sf/eclipsefp/haskell/ui/internal/web/editors/LuciusEditor.java
@@ -0,0 +1,7 @@
+package net.sf.eclipsefp.haskell.ui.internal.web.editors;
+
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+public class LuciusEditor extends StructuredTextEditor {
+ // Nothing
+}
View
20 net.sf.eclipsefp.haskell.util/src/net/sf/eclipsefp/haskell/util/ProcessRunner.java
@@ -10,6 +10,9 @@
public class ProcessRunner implements IProcessRunner {
private final IProcessFactory fProcessFactory;
+
+ private final static String STDOUT_REDIRECT = "output_redirect";
+ private final static String STDERR_REDIRECT = "error_redirect";
public ProcessRunner() {
this( new ProcessFactory() );
@@ -24,10 +27,10 @@ public int executeBlocking( final File workingDir, final Writer out,
Process proc = doExecute( workingDir, args );
- Thread outRedirect = redirect( new InputStreamReader( proc.getInputStream() ), out );
+ Thread outRedirect = redirect( new InputStreamReader( proc.getInputStream() ), out, STDOUT_REDIRECT );
Thread errRedirect = null;
if (err!=null){
- errRedirect = redirect( new InputStreamReader( proc.getErrorStream() ), err );
+ errRedirect = redirect( new InputStreamReader( proc.getErrorStream() ), err, STDERR_REDIRECT );
}
int code=-1;
try {
@@ -45,8 +48,8 @@ public int executeBlocking( final File workingDir, final Writer out,
public Process executeNonblocking( final File workingDir, final Writer out,
final Writer err, final String ... args ) throws IOException {
Process proc = doExecute( workingDir, args );
- redirect( new InputStreamReader( proc.getInputStream() ), out );
- redirect( new InputStreamReader( proc.getErrorStream() ), err );
+ redirect( new InputStreamReader( proc.getInputStream() ), out, STDOUT_REDIRECT );
+ redirect( new InputStreamReader( proc.getErrorStream() ), err, STDERR_REDIRECT );
return proc;
}
@@ -56,16 +59,15 @@ private Process doExecute( final File workingDir, final String ... args )
return proc;
}
- private static Thread redirect( final Reader in, final Writer out ) {
- Thread outRedirect = new StreamRedirect( "output_redirect", //$NON-NLS-1$
- in, out );
+ private static Thread redirect( final Reader in, final Writer out, String name ) {
+ Thread outRedirect = new StreamRedirect( name, in, out );
outRedirect.start();
return outRedirect;
}
public static Thread[] consume(Process proc){
- Thread t1=redirect( new InputStreamReader( proc.getInputStream() ), new StringWriter() );
- Thread t2=redirect( new InputStreamReader( proc.getErrorStream() ), new StringWriter() );
+ Thread t1=redirect( new InputStreamReader( proc.getInputStream() ), new StringWriter(), STDOUT_REDIRECT );
+ Thread t2=redirect( new InputStreamReader( proc.getErrorStream() ), new StringWriter(), STDERR_REDIRECT );
return new Thread[]{t1,t2};
}
Something went wrong with that request. Please try again.