Fix problem of not checking if current perspective equals target perspective before prompting to switch perspectives. Also, check if project is Qt Nature and skip if it's a bld.inf import.
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/ProjectUIPlugin.java Mon May 03 08:32:08 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/ProjectUIPlugin.java Mon May 03 16:01:45 2010 -0500
@@ -191,15 +191,13 @@
final IPerspectiveDescriptor perspective = workbench.getPerspectiveRegistry().findPerspectiveWithId("com.nokia.carbide.cpp.CarbideCppPerspective"); //$NON-NLS-1$
- IWorkbenchPage page = activeWorkbenchWindow.getActivePage();
- if (page != null)
+ final IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
+ if (activePage != null)
{
- if (page.getPerspective().getId().equals(perspective.getId()))
+ if (activePage.getPerspective().getId().equals(perspective.getId()))
return; // already on the default perspective for this projects
}
- final IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
-
if (activePage != null) {
job = new UIJob(""){ //$NON-NLS-1$
public IStatus runInUIThread(IProgressMonitor monitor) {
--- a/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/QtUIPlugin.java Mon May 03 08:32:08 2010 -0500
+++ b/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/QtUIPlugin.java Mon May 03 16:01:45 2010 -0500
@@ -136,6 +136,11 @@
}
final IPerspectiveDescriptor perspective = workbench.getPerspectiveRegistry().findPerspectiveWithId("com.trolltech.qtcppproject.QtCppPerspective"); //$NON-NLS-1$
final IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
+ if (activePage != null)
+ {
+ if (activePage.getPerspective().getId().equals(perspective.getId()))
+ return; // already on the default perspective for this projects
+ }
if (activePage != null) {
--- a/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/wizard/Messages.java Mon May 03 08:32:08 2010 -0500
+++ b/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/wizard/Messages.java Mon May 03 16:01:45 2010 -0500
@@ -127,7 +127,6 @@
public static String PerspectiveSwitchDialog_RememberDecisionText;
-
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);