From 812c85ec65ff0f5d2ebcfbdbadacaea2b84005d6 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal Date: Wed, 17 Aug 2011 12:28:14 +0530 Subject: Fixed Bug 3427 - All the extra added terminals are gone once we change the view --- .../plugin.xml | 11 +-------- .../management/console/ConsoleConstants.java | 26 ++++++++++++++++++++++ .../management/console/utils/GUIHelper.java | 5 ++--- .../console/views/GlusterViewsManager.java | 9 ++++---- .../management/console/views/TerminalView.java | 26 ---------------------- 5 files changed, 33 insertions(+), 44 deletions(-) create mode 100644 src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ConsoleConstants.java delete mode 100644 src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TerminalView.java (limited to 'src/com.gluster.storage.management.console') diff --git a/src/com.gluster.storage.management.console/plugin.xml b/src/com.gluster.storage.management.console/plugin.xml index 675b7e52..9cadd537 100644 --- a/src/com.gluster.storage.management.console/plugin.xml +++ b/src/com.gluster.storage.management.console/plugin.xml @@ -175,15 +175,6 @@ name="Tasks" restorable="true"> - - @@ -1419,7 +1410,7 @@ + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License + * for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see + * . + *******************************************************************************/ +package com.gluster.storage.management.console; + +/** + * + */ +public class ConsoleConstants { + public static final String TERMINAL_VIEW_ID = "org.eclipse.tm.terminal.view.TerminalView"; +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java index 841d5a9d..f46f9ddf 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java +++ b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java @@ -80,11 +80,11 @@ import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.progress.IProgressConstants; import com.gluster.storage.management.console.Application; +import com.gluster.storage.management.console.ConsoleConstants; import com.gluster.storage.management.console.GlusterDataModelManager; import com.gluster.storage.management.console.IImageKeys; import com.gluster.storage.management.console.views.NavigationView; import com.gluster.storage.management.console.views.TasksView; -import com.gluster.storage.management.console.views.TerminalView; import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; import com.gluster.storage.management.core.model.Disk; import com.gluster.storage.management.core.utils.JavaUtil; @@ -460,8 +460,7 @@ public class GUIHelper { } public void showTerminalView() { - //showView("org.eclipse.tm.terminal.view.TerminalView"); - showView(TerminalView.ID); + showView(ConsoleConstants.TERMINAL_VIEW_ID); } public void showProgressView() { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java index 928bc7fc..05c30626 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java +++ b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java @@ -24,6 +24,7 @@ import org.eclipse.ui.IViewReference; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; +import com.gluster.storage.management.console.ConsoleConstants; import com.gluster.storage.management.core.model.Cluster; import com.gluster.storage.management.core.model.Entity; import com.gluster.storage.management.core.model.EntityGroup; @@ -44,6 +45,7 @@ public class GlusterViewsManager implements ViewsManager { /* (non-Javadoc) * @see com.gluster.storage.management.console.views.ViewsManager#updateViews(com.gluster.storage.management.core.model.Entity) */ + @SuppressWarnings("rawtypes") @Override public void updateViews(Entity entity) { closeAllViews(); @@ -65,13 +67,11 @@ public class GlusterViewsManager implements ViewsManager { } } - /** - * - */ private void closeAllViews() { IViewReference[] viewReferences = page.getViewReferences(); for (final IViewReference viewReference : viewReferences) { - if (!(viewReference.getId().equals(NavigationView.ID) || viewReference.getId().equals(TerminalView.ID))) { + if (!(viewReference.getId().equals(NavigationView.ID) || viewReference.getId().equals( + ConsoleConstants.TERMINAL_VIEW_ID))) { page.hideView(viewReference); } } @@ -80,7 +80,6 @@ public class GlusterViewsManager implements ViewsManager { private void showViewsForCluster(Cluster cluster) throws PartInitException { page.showView(ClusterSummaryView.ID); page.showView(TasksView.ID, null, IWorkbenchPage.VIEW_CREATE); - //page.showView("org.eclipse.tm.terminal.view.TerminalView", null, IWorkbenchPage.VIEW_CREATE); } private void showViewsForVolume(Volume volume) throws PartInitException { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TerminalView.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TerminalView.java deleted file mode 100644 index d99ac513..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TerminalView.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * . - *******************************************************************************/ -package com.gluster.storage.management.console.views; - -/** - * - */ -public class TerminalView extends org.eclipse.tm.internal.terminal.view.TerminalView { - public static final String ID = TerminalView.class.getName(); -} -- cgit From 54e55c446d871325de23269623968a196d881fbf Mon Sep 17 00:00:00 2001 From: Dhandapani Date: Wed, 17 Aug 2011 14:02:16 +0530 Subject: Bug 3428: Volume create option is enabled even though the number of bricks is wrong - Fix --- .../gluster/storage/management/console/dialogs/CreateVolumePage1.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/com.gluster.storage.management.console') diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java index ba19ef10..8fa27087 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java +++ b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java @@ -409,9 +409,9 @@ public class CreateVolumePage1 extends WizardPage { VOLUME_TYPE volumeType = (VOLUME_TYPE) ((IStructuredSelection) typeComboViewer .getSelection()).getFirstElement(); - if (volumeType == VOLUME_TYPE.DISTRIBUTED_REPLICATE && diskCount % 2 != 0) { + if ((volumeType == VOLUME_TYPE.DISTRIBUTED_REPLICATE || volumeType == VOLUME_TYPE.REPLICATE ) && diskCount % 2 != 0) { setError("Mirror type volume requires bricks in multiples of two"); - } else if (volumeType == VOLUME_TYPE.DISTRIBUTED_STRIPE && diskCount % 4 != 0) { + } else if ((volumeType == VOLUME_TYPE.DISTRIBUTED_STRIPE || volumeType == VOLUME_TYPE.STRIPE) && diskCount % 4 != 0) { setError("Stripe type volume requires bricks in multiples of four"); } } -- cgit From 3a082258c516c82c4208b00b5307be35a468cd51 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal Date: Wed, 17 Aug 2011 15:11:54 +0530 Subject: Added reference to RichClientGUI in about text --- src/com.gluster.storage.management.console/plugin.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/com.gluster.storage.management.console') diff --git a/src/com.gluster.storage.management.console/plugin.properties b/src/com.gluster.storage.management.console/plugin.properties index 6a93e73d..4ef7da70 100644 --- a/src/com.gluster.storage.management.console/plugin.properties +++ b/src/com.gluster.storage.management.console/plugin.properties @@ -3,4 +3,5 @@ Version: 1.0.0\n\n\ Copyright (c) 2011 Gluster, Inc.\n\ Visit http://www.gluster.com/\n\n\ This product includes software developed by the\n\ -Eclipse Foundation http://eclipse.org/ \ No newline at end of file +Eclipse Foundation http://eclipse.org/\n\ +RichClientGUI http://www.richclientgui.com/ \ No newline at end of file -- cgit