|
Re: GEF PrintAction [message #230577 is a reply to message #230466] |
Tue, 13 February 2007 12:43 |
Eclipse User |
|
|
|
Originally posted by: jakub.jurkiewicz.gmail.com
Maybe try the method public void setEnabled(boolean enabled) that comes
from org.eclipse.jface.action.IAction interface (and PrintAction
implements this interface).
Let me know if it helps.
regards
Jakub Jurkiewicz
kathir wrote:
> I added a printaction to the ViewPart by calling the makeActions()
> method inside the createControl Method.
>
> private void makeActions() {
> printAction = new PrintAction(getSite().getPart());
> }
>
> I can see the print action added to the viewpart. But it is always
> disabled. How do i enable it?
>
> Thanks in advance,
>
> Regards
> Kathir.
|
|
|
|
Re: GEF PrintAction [message #230601 is a reply to message #230466] |
Tue, 13 February 2007 21:55 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
Well, obviously, just creating the action is not enough. You need to
register it as the handler for the global action. The GraphicalEditor does
a lot of things for you automatically, so in there all you need to do is
create the action and add it to the action registry. But in a view of your
own, you'd have to set up everything yourself. I suggest that you
understand how actions work in Eclipse before you try to fix this problem.
Note that this topic is not related to GEF and falls under the domain of
platform.
"kathir" <kathir@gmail.com> wrote in message
news:eqqulj$as9$1@utils.eclipse.org...
>I added a printaction to the ViewPart by calling the makeActions() method
>inside the createControl Method.
>
> private void makeActions() {
> printAction = new PrintAction(getSite().getPart());
> }
>
> I can see the print action added to the viewpart. But it is always
> disabled. How do i enable it?
>
> Thanks in advance,
>
> Regards
> Kathir.
|
|
|
Powered by
FUDForum. Page generated in 0.04353 seconds