Author: rob.stryker(a)jboss.com
Date: 2007-05-03 14:23:35 -0400 (Thu, 03 May 2007)
New Revision: 1997
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesView.java
Log:
Removed the null pointer error.
Behavior upon closing and re-opening view is still buggy.
Attachment added. If anyone is familiar with global selection service
and what might be causing this feel free to advise.
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.java 2007-05-03
16:52:14 UTC (rev 1996)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.java 2007-05-03
18:23:35 UTC (rev 1997)
@@ -9,9 +9,7 @@
public static String NewJARWizard_windowTitle_editJAR;
public static String PackageInfoWizardPage_compressedButton_label;
- public static String PackageInfoWizardPage_customManifest_label;
public static String PackageInfoWizardPage_destination_label;
- public static String PackageInfoWizardPage_error_noManifest;
public static String PackageInfoWizardPage_error_noPackageName;
public static String PackageInfoWizardPage_error_packageAlreadyExists;
public static String PackageInfoWizardPage_error_noDestination;
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesView.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesView.java 2007-05-03
16:52:14 UTC (rev 1996)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesView.java 2007-05-03
18:23:35 UTC (rev 1997)
@@ -25,8 +25,11 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.INullSelectionListener;
import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.ViewPart;
@@ -55,14 +58,25 @@
public ProjectArchivesView() {
instance = this;
selectionListener = createSelectionListener();
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().addSelectionListener(selectionListener);
+ }
+
+ public void init(IViewSite site) throws PartInitException {
+ super.init(site);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().addPostSelectionListener(selectionListener);
ArchivesCore.getInstance().addModelListener(this);
}
+ public void dispose() {
+ super.dispose();
+
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().removePostSelectionListener(selectionListener);
+ ArchivesCore.getInstance().removeModelListener(this);
+ }
+
protected ISelectionListener createSelectionListener() {
- return new ISelectionListener() {
+ return new INullSelectionListener() {
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+ System.out.println("selection changed: " + selection);
if (!(selection instanceof IStructuredSelection))
return;
Show replies by date