Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 186369 Details for
Bug 320507
[Xtend] should show error when forgetting a semicolon in .ext file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch for this bug
fixBug320507.patch (text/plain), 1.93 KB, created by
Benedikt Niehues
on 2011-01-10 05:17:39 EST
(
hide
)
Description:
patch for this bug
Filename:
MIME Type:
Creator:
Benedikt Niehues
Created:
2011-01-10 05:17:39 EST
Size:
1.93 KB
patch
obsolete
>From d1c2ccc13c9c39a4f109699aacd6a9cab0317c15 Mon, 10 Jan 2011 11:09:09 +0100 >From: Benedikt Niehues <benedikt.niehues@itemis.de> >Date: Mon, 10 Jan 2011 11:08:56 +0100 >Subject: [PATCH] fixBug320507 > >diff --git a/plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/ResourceContributorBase.java b/plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/ResourceContributorBase.java >index ee89111..70e4f82 100644 >--- a/plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/ResourceContributorBase.java >+++ b/plugins/org.eclipse.xtend.shared.ui/src/org/eclipse/xtend/shared/ui/ResourceContributorBase.java >@@ -10,6 +10,7 @@ > *******************************************************************************/ > package org.eclipse.xtend.shared.ui; > >+import java.io.IOException; > import java.io.InputStream; > import java.io.InputStreamReader; > import java.io.Reader; >@@ -43,11 +44,27 @@ > // BNI bug#312571 > // 1. start position can be 0 (missing semicolon at the end of a file) > // 2. why should only one error be handled (!hasErrors) >- if (e.getStart() >= 0) { >- if (source instanceof IFile) { >- IFile f = (IFile) source; >- XtendXpandMarkerManager.addErrorMarker(f, e.getMessage(), IMarker.SEVERITY_ERROR, e.getStart(), >- e.getEnd()); >+ int start = e.getStart(); >+ int end = e.getEnd(); >+ if (source instanceof IFile) { >+ IFile f = (IFile) source; >+ if (start == 0 && end == 1 && e.getMessage().contains("<EOF>")) { >+ // BNI find the offset of the last charcter! >+ try { >+ Reader reader = createReader(source); >+ while (reader.read() != -1) { >+ start++; >+ end++; >+ } >+ start--; >+ end--; >+ } >+ catch (IOException e2) { >+ logError(e2.getMessage(), e2); >+ } >+ } >+ if (start > 0) { >+ XtendXpandMarkerManager.addErrorMarker(f, e.getMessage(), IMarker.SEVERITY_ERROR, start, end); > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
karsten.thoms
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 320507
:
186171
| 186369