Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » problemreporter bug in 0.95.1 released version
problemreporter bug in 0.95.1 released version [message #33416] Thu, 16 October 2008 04:47 Go to next message
Sheela is currently offline SheelaFriend
Messages: 52
Registered: July 2009
Member
Hi,
We are releasing our IDE with DLTK 0.95.1 released version.But there seems
to be a bug in the problem reporter.

The issue is suppose i open a script file, make a small change so as to
produce a syntax error, the errors are reported in problems view.

So far so good; now close the script without saving, the problems view is
not cleared.

When i reopen the file, it opens the saved file which doesnot have any
syntax errors. But my problems view still shows errors of the unsaved
version.

I tried to debug and found that getProblemReporter() in
AbstractSourceElementParser is null, for first parse on the script file,
which is why it fails.

It has been solved in the latest integration build but we are about to
release our product with 0.95.1 dltk released version. Can we have some
fix for this version.

Please do the needful.

Thanks and regards,
sheela.
Re: problemreporter bug in 0.95.1 released version [message #33494 is a reply to message #33416] Mon, 20 October 2008 08:16 Go to previous messageGo to next message
Alex Panchenko is currently offline Alex PanchenkoFriend
Messages: 342
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050608010501080806080704
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi Sheela,

At the moment you can use a workaround similar to the attached.

We will make the proper fix in CVS and it will be released as part of
the 0.95.2 bugfix release.

Regards,
Alex


Sheela wrote:
> Hi,
> We are releasing our IDE with DLTK 0.95.1 released version.But there
> seems to be a bug in the problem reporter.
>
> The issue is suppose i open a script file, make a small change so as to
> produce a syntax error, the errors are reported in problems view.
>
> So far so good; now close the script without saving, the problems view
> is not cleared.
>
> When i reopen the file, it opens the saved file which doesnot have any
> syntax errors. But my problems view still shows errors of the unsaved
> version.
>
> I tried to debug and found that getProblemReporter() in
> AbstractSourceElementParser is null, for first parse on the script file,
> which is why it fails.
>
> It has been solved in the latest integration build but we are about to
> release our product with 0.95.1 dltk released version. Can we have some
> fix for this version.
>
> Please do the needful.
>
> Thanks and regards,
> sheela.
>


--------------050608010501080806080704
Content-Type: text/plain;
name="reparse-dispose-unsaved-changes.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="reparse-dispose-unsaved-changes.patch"

### Eclipse Workspace Patch 1.0
#P org.eclipse.dltk.ruby.ui
Index: src/org/eclipse/dltk/ruby/internal/ui/editor/RubyEditor.java
============================================================ =======
RCS file: /cvsroot/technology/org.eclipse.dltk/ruby/plugins/org.eclips e.dltk.ruby.ui/src/org/eclipse/dltk/ruby/internal/ui/editor/ RubyEditor.java,v
retrieving revision 1.19.4.1
diff -u -r1.19.4.1 RubyEditor.java
--- src/org/eclipse/dltk/ruby/internal/ui/editor/RubyEditor.java 20 Oct 2008 07:45:04 -0000 1.19.4.1
+++ src/org/eclipse/dltk/ruby/internal/ui/editor/RubyEditor.java 20 Oct 2008 08:10:43 -0000
@@ -9,10 +9,17 @@
************************************************************ *******************/
package org.eclipse.dltk.ruby.internal.ui.editor;

+import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.dltk.compiler.problem.IProblemFactory;
+import org.eclipse.dltk.core.DLTKLanguageManager;
import org.eclipse.dltk.core.IDLTKLanguageToolkit;
import org.eclipse.dltk.core.IModelElement;
+import org.eclipse.dltk.core.ISourceModule;
+import org.eclipse.dltk.core.ModelException;
+import org.eclipse.dltk.core.SourceParserUtil;
+import org.eclipse.dltk.internal.core.ModelManager;
import org.eclipse.dltk.internal.ui.actions.FoldingActionGroup;
import org.eclipse.dltk.internal.ui.editor.DLTKEditorMessages;
import org.eclipse.dltk.internal.ui.editor.ScriptEditor;
@@ -23,6 +30,7 @@
import org.eclipse.dltk.ruby.internal.ui.text.IRubyPartitions;
import org.eclipse.dltk.ruby.internal.ui.text.RubyPairMatcher;
import org.eclipse.dltk.ruby.internal.ui.text.folding.RubyFoldingSt ructureProvider;
+import org.eclipse.dltk.ui.DLTKUIPlugin;
import org.eclipse.dltk.ui.actions.IScriptEditorActionDefinitionIds ;
import org.eclipse.dltk.ui.text.ScriptTextTools;
import org.eclipse.dltk.ui.text.folding.IFoldingStructureProvider;
@@ -195,6 +203,27 @@
if (sourceViewer instanceof ITextViewerExtension)
((ITextViewerExtension) sourceViewer)
.removeVerifyKeyListener(fBracketInserter);
+ if (isDirty()) {
+ final IModelElement modelElement = getInputModelElement();
+ if (modelElement != null) {
+ ISourceModule module = (ISourceModule) modelElement
+ .getAncestor(IModelElement.SOURCE_MODULE);
+ ModelManager.getModelManager().getSourceModuleInfoCache()
+ .remove(module);
+ IFile resource = (IFile) module.getResource();
+ try {
+ module.getBuffer().setContents(
+ org.eclipse.dltk.internal.core.util.Util
+ .getResourceContentsAsCharArray(resource));
+ } catch (ModelException e) {
+ DLTKUIPlugin.log(e);
+ }
+ IProblemFactory factory = DLTKLanguageManager
+ .getProblemFactory(getLanguageToolkit().getNatureId());
+ SourceParserUtil.getModuleDeclaration(module, factory
+ .createReporter(resource));
+ }
+ }
super.dispose();
}


--------------050608010501080806080704--
Re: problemreporter bug in 0.95.1 released version [message #33527 is a reply to message #33494] Mon, 20 October 2008 08:49 Go to previous message
Alex Panchenko is currently offline Alex PanchenkoFriend
Messages: 342
Registered: July 2009
Senior Member
Sorry, probably it is not clear from the patch: this code should be
placed in the dispose() method of your editor extending ScriptEditor.


Alex Panchenko wrote:
> Hi Sheela,
>
> At the moment you can use a workaround similar to the attached.
>
> We will make the proper fix in CVS and it will be released as part of
> the 0.95.2 bugfix release.
>
> Regards,
> Alex
>
>
> Sheela wrote:
>> Hi,
>> We are releasing our IDE with DLTK 0.95.1 released version.But there
>> seems to be a bug in the problem reporter.
>>
>> The issue is suppose i open a script file, make a small change so as
>> to produce a syntax error, the errors are reported in problems view.
>>
>> So far so good; now close the script without saving, the problems view
>> is not cleared.
>>
>> When i reopen the file, it opens the saved file which doesnot have any
>> syntax errors. But my problems view still shows errors of the unsaved
>> version.
>>
>> I tried to debug and found that getProblemReporter() in
>> AbstractSourceElementParser is null, for first parse on the script
>> file, which is why it fails.
>>
>> It has been solved in the latest integration build but we are about to
>> release our product with 0.95.1 dltk released version. Can we have
>> some fix for this version.
>>
>> Please do the needful.
>>
>> Thanks and regards,
>> sheela.
>>
>
Previous Topic:Using ScriptEditor without Eclipse project
Next Topic:refactoring sources - please let us know
Goto Forum:
  


Current Time: Thu Nov 27 04:52:27 GMT 2014

Powered by FUDForum. Page generated in 0.02571 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software