1

I am trying to make some changes to a legacy code of a plugin which was written using Java version 4. I am trying to extend a class from an imported package.

import org.eclipse.wst.xml.core.internal.document.XMLModelContext;

public class XMLModelContextForPma extends XMLModelContext
{


}

I'm quite new to plugin development. I couldn't figure out why the compiler shows

The type org.eclipse.wst.xml.core.internal.document.XMLModelContext is not visible error. Also, most of the codes in classes of this particular package are using .internal. packages which are giving Discouraged access warnings. I'm googled here and there and found it's because of non-standard/API classes.

But this is quite strange. I have the jar files in the build path but not sure what is wrong here.

I'm developing in Eclipse Juno, Mac OS X, Java 6

2 Answers 2

2

It looks like the class XMLModelContext is private or protected and in a different package.

If a class is declared as protected, you can only use it in other classes within the same package or any of it's sub packages.

Sign up to request clarification or add additional context in comments.

1 Comment

yeah, i just noticed it has a default identifier so obviously isn't not gonna be visible outside its containing package
0

Add that jar(org.eclipse.wst.xml.core.internal.document.XMLModelContext containing jar) to your project file path.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.