Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to make styledText "visible" in other files.
How to make styledText "visible" in other files. [message #464971] Fri, 02 December 2005 12:21
Eclipse UserFriend
Originally posted by: qingxing20052.gmail.com

Dear all:

There is one styledText widget in my View A. I also create one Action called
"Copy" which is used to copy the content in styledText.

The CopyAction.Java is as follows:

public class CopyAction extends Action {

private final IWorkbenchWindow window;

public CopyAction(String text, IWorkbenchWindow window) {
......
}

public void run() {
styledText.copy(); //There is one error.

}
}

The problem is that there is one error about styledText.copy(). It seems
that styledText is not "visible" for CopyAction.Java, although I declared it
in my view file in terms of "public StyledText styledText = null;"

And I have already import the relative package. E.g. "import
org.eclipsercp.myView"


How shall I solve this problem? Does anyone have a few comments?

Thanks in advanced.
Previous Topic:Getting a reference to the OK button in Dialog
Next Topic:Resizing Windows task bar affects SWT layout
Goto Forum:
  


Current Time: Wed Nov 26 15:47:15 GMT 2014

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

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