Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] getting an ISourceModule in my own project (IOpenable)

Hi Johan,

I suppose main problem are with resource synchronization.
Then resources are modified outside of eclipse, any DLTK operation will failed to work with this resource. For example editor will show what "Resources is not is sync with file system".
The same are for creating markers.

If you know then resources are modified outside of eclipse, you could call IProject.refreshLocal(IResource.DEPTH_INFINITE) to make all resources synchronized. This will help with marker creation, etc.

As for editors then resource are not in sync, I've also think what this is a possibly bug in DLTK. Because if we try to open editor with such resource, and then call project refresh, editor will not be refreshed (Shows what resource are not in sync).
I will check if JDT has different behavior in this  case.

How to get ISourceModule instance:
Please use DLTKCore.createSourceModuleFrom(IFile file) method.

IOpenable.makeConsistent:
Please use ISourceModule.reconcile() instead of makeConsistent.
Because reconsile will use correct deltas and then call makeConsistent.

Best regards,
Andrei Sobolev.
I want to call IOpenable.makeConsistent() myself.
because we notice if there is a file changed from underneath eclipse.
here are no markers created, the editor doesnt even see them when you then just open the script editor of that file (which is i think a bug in dltk) But the problem is we are listening to file changes to make everything consistent. But that code is programmed if there are error markers dont do anything.. Because then we also need to parse the file completely and check for errors ourself.

So what i want to do is just call makeConsistent and then test on markers.. But how do i get an implementation of ISourceModule?
The interface is public and not internal but the rest seems to be.. :(

Or should/can we fix this in dltk itself so that it does "compile/check" the files constantly?
(or is there already something like that that i miss?)

johan

------------------------------------------------------------------------

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev



Back to the top