summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorning.zhang2012-02-23 21:40:41 (EST)
committer dgao2012-02-23 21:40:41 (EST)
commita25c13885ff4eb67b5c65a4e228581a1b90758b6 (patch)
treedcbed349edcd3231faa6ec44d68b061190afb948
parent4ea0f36443115886151a1c6d136ad49c38c1dae9 (diff)
downloadorg.eclipse.birt-a25c13885ff4eb67b5c65a4e228581a1b90758b6.zip
org.eclipse.birt-a25c13885ff4eb67b5c65a4e228581a1b90758b6.tar.gz
org.eclipse.birt-a25c13885ff4eb67b5c65a4e228581a1b90758b6.tar.bz2
Summary:
Fixed an issue which may cause the action not working. Description: Fixed an issue which may cause the action not working.
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/navigator/PublishTemplateNavigatorAction.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/navigator/PublishTemplateNavigatorAction.java b/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/navigator/PublishTemplateNavigatorAction.java
index ff93b61..067c53f 100644
--- a/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/navigator/PublishTemplateNavigatorAction.java
+++ b/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/navigator/PublishTemplateNavigatorAction.java
@@ -27,7 +27,6 @@ import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.views.navigator.ResourceNavigator;
/**
*
@@ -36,17 +35,14 @@ import org.eclipse.ui.views.navigator.ResourceNavigator;
public class PublishTemplateNavigatorAction implements IViewActionDelegate
{
- protected ResourceNavigator navigator;
+ protected IViewPart navigator;
/**
* @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
*/
public void init( IViewPart view )
{
- if ( view instanceof ResourceNavigator )
- {
- navigator = (ResourceNavigator) view;
- }
+ navigator = view;
}
/**
@@ -117,8 +113,7 @@ public class PublishTemplateNavigatorAction implements IViewActionDelegate
{
if ( navigator != null )
{
- IStructuredSelection selection = (IStructuredSelection) navigator.getTreeViewer( )
- .getSelection( );
+ IStructuredSelection selection = (IStructuredSelection) navigator.getViewSite( ).getSelectionProvider( ).getSelection( );
if ( selection.size( ) == 1
&& selection.getFirstElement( ) instanceof IFile )
{