KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ltk > internal > core > refactoring > RefactoringCorePreferences


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ltk.internal.core.refactoring;
13
14 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
15
16 public class RefactoringCorePreferences {
17
18     // private static final String CONDITION_CHECKING_FAILED_SEVERITY= "condidtionCheckingFailed"; //$NON-NLS-1$
19

20     public static int getCheckPassedSeverity() {
21         /*
22         String value= RefactoringUIPlugin.getDefault().getPreferenceStore().getString(CONDITION_CHECKING_FAILED_SEVERITY);
23         try {
24             return Integer.valueOf(value).intValue() - 1;
25         } catch (NumberFormatException e) {
26             return RefactoringStatus.WARNING;
27         }
28         */

29         return RefactoringStatus.INFO;
30     }
31     
32     public static int getStopSeverity() {
33         switch (getCheckPassedSeverity()) {
34             case RefactoringStatus.OK:
35                 return RefactoringStatus.INFO;
36             case RefactoringStatus.INFO:
37                 return RefactoringStatus.WARNING;
38             case RefactoringStatus.WARNING:
39                 return RefactoringStatus.ERROR;
40         }
41         return RefactoringStatus.FATAL;
42     }
43 }
44
Popular Tags