aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Still2013-08-26 09:56:02 (EDT)
committerGerrit Code Review @ Eclipse.org2013-10-30 14:42:35 (EDT)
commit4340ee4c895638a1c486b2428bb42f36298921cd (patch)
tree13c955f368673ed1bd4a014d2c15fd210388e1e9
parent5438d8323aa6ff6cc59f5de9f305a490c7392410 (diff)
downloadeclipse.platform.ui-4340ee4c895638a1c486b2428bb42f36298921cd.zip
eclipse.platform.ui-4340ee4c895638a1c486b2428bb42f36298921cd.tar.gz
eclipse.platform.ui-4340ee4c895638a1c486b2428bb42f36298921cd.tar.bz2
Bug 415875 - [JFace][Snippets] Snippet055HideShowColumn hides column,I20131030-2000refs/changes/54/15854/3
but does not shows column again Change-Id: Ica1606cf53fa2e5483420ec1164489f381d4f712 Signed-off-by: Hendrik Still <hendrik.still@vogella.com>
-rw-r--r--examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java b/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java
index 783c482..10b7630 100644
--- a/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java
+++ b/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 Tom Schindl and others.
+ * Copyright (c) 2006, 2013 Tom Schindl and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Tom Schindl - initial API and implementation
+ * Henrik Still<hendrik.still@gammas.de> - bug 415875
*******************************************************************************/
package org.eclipse.jface.snippets.viewers;
@@ -20,7 +21,9 @@ import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
import org.eclipse.jface.viewers.EditingSupport;
import org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.TreeViewer;
@@ -189,7 +192,11 @@ public class Snippet055HideShowColumn {
b.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
b.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- column_2.getColumn().setWidth(0);
+ if(column_2.getColumn().getWidth() == 0){
+ column_2.getColumn().setWidth(200);
+ }else{
+ column_2.getColumn().setWidth(0);
+ }
}
});
}