Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » CompilationUnitDocumentProvider.java
CompilationUnitDocumentProvider.java [message #172247] Sat, 07 August 2004 08:12 Go to next message
Eclipse UserFriend
Originally posted by: crscca.bol.net.in

I am creating some code using this:-
IPackageFragment packageFragment = sourceFolder.createPackageFragment(
packageName, true, monitor);
packageFragment.createCompilationUnit("SomeClass.java",
theCodeAsAString, true, monitor);

Sometimes I get this following message( not when I am creating the code
but when I am exitting the runtime workbench in the console):-
Can anyone suggest something? Usually it all works without any issues.


java.lang.NullPointerException
at
org.eclipse.ui.editors.text.TextFileDocumentProvider.<init>(TextFileDocumentProvider.java:384)
at
org.eclipse.ui.editors.text.TextFileDocumentProvider.<init>(TextFileDocumentProvider.java:369)
at
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocume ntProvider. <init>(CompilationUnitDocumentProvider.java:772)
at
org.eclipse.jdt.internal.ui.JavaPlugin.getCompilationUnitDoc umentProvider(JavaPlugin.java:514)
at
org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStr ategy.getProblemRequestorExtension(JavaCompositeReconcilingS trategy.java:63)
at
org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStr ategy.initialReconcile(JavaCompositeReconcilingStrategy.java :118)
at
org.eclipse.jface.text.reconciler.MonoReconciler.initialProc ess(MonoReconciler.java:103)
at
org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProce ss(JavaReconciler.java:304)
at
org.eclipse.jface.text.reconciler.AbstractReconciler$Backgro undThread.run(AbstractReconciler.java:170)
Re: CompilationUnitDocumentProvider.java [message #172431 is a reply to message #172247] Mon, 09 August 2004 10:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olivier_thomannNO.ca.ibm.comSPAM

Le Sat, 7 Aug 2004 12:12:06 +0000 (UTC), crscca@bol.net.in (Raster) a
écrit :
>I am creating some code using this:-
>IPackageFragment packageFragment = sourceFolder.createPackageFragment(
> packageName, true, monitor);
> packageFragment.createCompilationUnit("SomeClass.java",
> theCodeAsAString, true, monitor);
>
>Sometimes I get this following message( not when I am creating the code
>but when I am exitting the runtime workbench in the console):-
>Can anyone suggest something? Usually it all works without any issues.
>java.lang.NullPointerException
> at
>org.eclipse.ui.editors.text.TextFileDocumentProvider.<init >(TextFileDocumentProvider.java:384)
Are you sure that this runs in an Eclipse workbench? The line 384 is:

fResourceRuleFactory=
ResourcesPlugin.getWorkspace().getRuleFactory();

So I would say that that the ResourcesPlugin.getWorkspace() returns
null.
--
Olivier
Re: CompilationUnitDocumentProvider.java [message #172860 is a reply to message #172431] Wed, 11 August 2004 03:06 Go to previous message
Eclipse UserFriend
Originally posted by: crscca.bol.net.in

Sounds logical.
So what does this mean?
Let me reproduce my error and see.
Must be some bug in my code I guess. maybe under some condition I am using
a sourcefolder or something which does not have a workspace somehow.
Let me check.
Thanks.


Olivier Thomann wrote:

> Le Sat, 7 Aug 2004 12:12:06 +0000 (UTC), crscca@bol.net.in (Raster) a
> écrit :
> >I am creating some code using this:-
> >IPackageFragment packageFragment = sourceFolder.createPackageFragment(
> > packageName, true, monitor);
> > packageFragment.createCompilationUnit("SomeClass.java",
> > theCodeAsAString, true, monitor);
> >
> >Sometimes I get this following message( not when I am creating the code
> >but when I am exitting the runtime workbench in the console):-
> >Can anyone suggest something? Usually it all works without any issues.
> >java.lang.NullPointerException
> > at
>
>org.eclipse.ui.editors.text.TextFileDocumentProvider.<init >(TextFileDocumentProvider.java:384)
> Are you sure that this runs in an Eclipse workbench? The line 384 is:

> fResourceRuleFactory=
> ResourcesPlugin.getWorkspace().getRuleFactory();

> So I would say that that the ResourcesPlugin.getWorkspace() returns
> null.
> --
> Olivier
Previous Topic:Auto Complete
Next Topic:Only compile classes accessible from the main class?
Goto Forum:
  


Current Time: Tue Jul 22 14:47:38 EDT 2025

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

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

Back to the top