Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Discouraged access: The method getViewPartInput()
Discouraged access: The method getViewPartInput() [message #127569] Wed, 05 July 2006 01:00 Go to next message
Eclipse UserFriend
Originally posted by: rashmi_h_r.rediffmail.com

Hi All,
I have started using Eclipse 3.2 and VE 1.2. In VE 1.1, I was using
the current active JavaVisualEditor for accessing the CompilationUnit ,
the visual editor is opened on.
The code used is as below.

javaVisualEditor = (JavaVisualEditorPart) activeEditor;
EditDomain ed = (EditDomain) ((EditPartViewer) javaVisualEditor
.getAdapter(EditPartViewer.class)).getEditDomain();

ICompilationUnit compilationUnit = (ICompilationUnit)
javaVisualEditor.getViewPartInput();


After tp comiple the same code in VE 1.2. I am getting a warning as below

Discouraged access: The method getViewPartInput() from the type JavaEditor
is not accessible due to restriction on required library
C:\Eclipse3.2\eclipse\plugins\org.eclipse.jdt.ui_3.2.0.v2006 0605-1400.jar myPath/mypackage MyClass.java line
262 1152010092181 31442



Can anybody please help me to solve this issue? And help me in accessing
the CompilationUnit of the active VisualEditor.

Thanks in advance.
regards,
RashmiH.R
Re: Discouraged access: The method getViewPartInput() [message #127608 is a reply to message #127569] Wed, 05 July 2006 09:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

Rashmi,

The JavaEditor class (which the JavaVisualEditorPart class extends) from
JDT is in an internal package. If you make any calls to methods on that
class will provide you with that warning, meaning you're using methods
that are not part of the Eclipse public API, and the API contracts are
not guaranteed between versions, etc. If you're ok with that, you can
just ignore the warning. You may also be able to turn that warning off
in the Java compiler options, but I'm not sure about that.

Hope this helps,
- Jeff
Re: Discouraged access: The method getViewPartInput() [message #127776 is a reply to message #127608] Wed, 05 July 2006 23:51 Go to previous message
Eclipse UserFriend
Originally posted by: rashmi_h_r.rediffmail.com

Hi Jeff,
Thanks for the reply.Can you please suggest me how do I go about
getting the Compilation unit from the Java Visual Editor. It would be a
great help.

Thank You and Best Regarsd,
Rashmi H.R
Re: Discouraged access: The method getViewPartInput() [message #613451 is a reply to message #127569] Wed, 05 July 2006 09:50 Go to previous message
Eclipse UserFriend
Rashmi,

The JavaEditor class (which the JavaVisualEditorPart class extends) from
JDT is in an internal package. If you make any calls to methods on that
class will provide you with that warning, meaning you're using methods
that are not part of the Eclipse public API, and the API contracts are
not guaranteed between versions, etc. If you're ok with that, you can
just ignore the warning. You may also be able to turn that warning off
in the Java compiler options, but I'm not sure about that.

Hope this helps,
- Jeff
Re: Discouraged access: The method getViewPartInput() [message #613464 is a reply to message #127608] Wed, 05 July 2006 23:51 Go to previous message
Eclipse UserFriend
Originally posted by: rashmi_h_r.rediffmail.com

Hi Jeff,
Thanks for the reply.Can you please suggest me how do I go about
getting the Compilation unit from the Java Visual Editor. It would be a
great help.

Thank You and Best Regarsd,
Rashmi H.R
Previous Topic:Default layout manager for VE 1.2 RC version
Next Topic:Why Callisto contains VE RC version?
Goto Forum:
  


Current Time: Sat Jun 14 23:53:10 EDT 2025

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

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

Back to the top