Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Untitled text file
Untitled text file [message #293885] Tue, 01 November 2005 10:41 Go to next message
Eclipse UserFriend
Originally posted by: laasunde.online.no

Hi,

I'm making a small plugin for eclipse 3.1 which requires the same action
as clicking File->New->Untitled Text File. So I'm trying to access\reuse
this code which is located in the org.eclipse.ui.editor package.

However when I try to create an object of the class UntitledTextFileWizard
like shown below I get this following message from eclipse "Discouraged
access: The type UntitledTextFileWizard is not accessible due to
restriction on required project org.eclipse.ui.editors"

public void run(IAction action) 
{			
  UntitledTextFileWizard obj = new UntitledTextFileWizard();
}


Any ideas on howto get around this problem or solving it in another way?
Just interested in opening en empty sheet in the active editor and add
some text to it. Sounds simple enough but it's proven to be a challenge
for me. Hope anyone can shed some light on this.

Cheers :)
Re: Untitled text file [message #294002 is a reply to message #293885] Thu, 03 November 2005 10:23 Go to previous message
Eclipse UserFriend
LA wrote:
> I'm making a small plugin for eclipse 3.1 which requires the same action
> as clicking File->New->Untitled Text File. So I'm trying to access\reuse
> this code which is located in the org.eclipse.ui.editor package.
> However when I try to create an object of the class
> UntitledTextFileWizard like shown below I get this following message
> from eclipse "Discouraged access: The type UntitledTextFileWizard is not
> accessible due to restriction on required project org.eclipse.ui.editors"

This means you are using internal code that may change anytime without
notice. You can either live with that or copy the code into your own code.

-tom
Previous Topic:Custom method syntax coloring
Next Topic:Thoughts on running eclipse using jvm -server?
Goto Forum:
  


Current Time: Wed Jul 16 22:55:54 EDT 2025

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

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

Back to the top