1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Fix for 75916: Errors and exceptions in log if you try create a C++ project with

same name/different case.
This commit is contained in:
Bogdan Gheorghe 2005-02-10 16:52:12 +00:00
parent fb287fa5a4
commit af477cff1d
4 changed files with 21 additions and 6 deletions

View file

@ -1,3 +1,12 @@
2005-02-10 Bogdan Gheorghe
Fix for 75916: Errors and exceptions in log if you try create a C++ project with
same name/different case.
Refactored CUIPlugin.errorDialog to take a boolean logError.
* src/org/eclipse/cdt/ui/CUIPlugin.java
* src/org/eclipse/cdt/ui/dialogs/TabFolderOptionBlock.java
* src/org/eclipse/cdt/ui/wizards/NewCProjectWizard.java
2005-02-09 Alain Magloire 2005-02-09 Alain Magloire
PR 84841: Description of the template in the hover was incorrect. PR 84841: Description of the template in the hover was incorrect.
* src/org/eclipse/cdt/internal/ui/text/TemplateEngine.java * src/org/eclipse/cdt/internal/ui/text/TemplateEngine.java

View file

@ -294,9 +294,12 @@ public class CUIPlugin extends AbstractUIPlugin {
/** /**
* Utility method with conventions * Utility method with conventions
* @param logError TODO
*/ */
public static void errorDialog(Shell shell, String title, String message, IStatus s) { public static void errorDialog(Shell shell, String title, String message, IStatus s, boolean logError) {
getDefault().log(s); if (logError)
getDefault().log(s);
// if the 'message' resource string and the IStatus' message are the same, // if the 'message' resource string and the IStatus' message are the same,
// don't show both in the dialog // don't show both in the dialog
if (s != null && message.equals(s.getMessage())) { if (s != null && message.equals(s.getMessage())) {
@ -307,9 +310,12 @@ public class CUIPlugin extends AbstractUIPlugin {
/** /**
* Utility method with conventions * Utility method with conventions
* @param logError TODO
*/ */
public static void errorDialog(Shell shell, String title, String message, Throwable t) { public static void errorDialog(Shell shell, String title, String message, Throwable t, boolean logError) {
getDefault().log(t); if (logError)
getDefault().log(t);
IStatus status; IStatus status;
if (t instanceof CoreException) { if (t instanceof CoreException) {
status = ((CoreException) t).getStatus(); status = ((CoreException) t).getStatus();

View file

@ -163,7 +163,7 @@ public abstract class TabFolderOptionBlock {
} catch (CoreException e) { } catch (CoreException e) {
CUIPlugin.errorDialog( CUIPlugin.errorDialog(
composite.getShell(), composite.getShell(),
CUIMessages.getString("TabFolderOptionBlock.error"), CUIMessages.getString("TabFolderOptionBlock.error.settingOptions"), e); //$NON-NLS-1$ //$NON-NLS-2$ CUIMessages.getString("TabFolderOptionBlock.error"), CUIMessages.getString("TabFolderOptionBlock.error.settingOptions"), e, true); //$NON-NLS-1$ //$NON-NLS-2$
return false; return false;
} }
} }

View file

@ -242,7 +242,7 @@ public abstract class NewCProjectWizard extends BasicNewResourceWizard implement
String message= CUIPlugin.getResourceString(OP_ERROR + ".message"); //$NON-NLS-1$ String message= CUIPlugin.getResourceString(OP_ERROR + ".message"); //$NON-NLS-1$
Throwable th= e.getTargetException(); Throwable th= e.getTargetException();
CUIPlugin.errorDialog(shell, title, message, th); CUIPlugin.errorDialog(shell, title, message, th, false);
try { try {
getProjectHandle().delete(false, false, null); getProjectHandle().delete(false, false, null);
} catch (CoreException ignore) { } catch (CoreException ignore) {