diff options
author | Xavier Ducrohet <xav@android.com> | 2012-08-16 19:28:20 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-08-17 11:36:32 -0700 |
commit | ae6a209f6f4030e1ebe20118f9455547e4cd50fc (patch) | |
tree | f61ce892f88e3bee449eb6dddc8f820a4bfa6f1e /ide_common/src/com/android/ide/common | |
parent | 8863aa8bdefdc769f483f72ab90b3d9d97aba212 (diff) | |
download | sdk-ae6a209f6f4030e1ebe20118f9455547e4cd50fc.zip sdk-ae6a209f6f4030e1ebe20118f9455547e4cd50fc.tar.gz sdk-ae6a209f6f4030e1ebe20118f9455547e4cd50fc.tar.bz2 |
Unify all loggers in the sdk tools.
Removed ILogger from ide_common
Removed ISdkLog (and implementations) from sdklib
Moved all existing code to com.android.utils.ILogger
which is located in common.
Change-Id: Icd674d4b8d10f6ae8b60a83acb43cc53c7a52137
Diffstat (limited to 'ide_common/src/com/android/ide/common')
3 files changed, 2 insertions, 68 deletions
diff --git a/ide_common/src/com/android/ide/common/log/ILogger.java b/ide_common/src/com/android/ide/common/log/ILogger.java deleted file mode 100644 index 1ad602e..0000000 --- a/ide_common/src/com/android/ide/common/log/ILogger.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.ide.common.log; - -import java.util.Formatter; - -public interface ILogger { - - /** - * Prints a warning message on stdout. - * <p/> - * The message will be tagged with "Warning" on the output so the caller does not - * need to put such a prefix in the format string. - * <p/> - * Implementations should only display warnings in verbose mode. - * - * @param warningFormat is an optional error format. If non-null, it will be printed - * using a {@link Formatter} with the provided arguments. - * @param args provides the arguments for warningFormat. - */ - void warning(String warningFormat, Object... args); - - /** - * Prints an error message on stderr. - * <p/> - * The message will be tagged with "Error" on the output so the caller does not - * need to put such a prefix in the format string. - * <p/> - * Implementation should always display errors, independent of verbose mode. - * - * @param t is an optional {@link Throwable} or {@link Exception}. If non-null, it's - * message will be printed out. - * @param errorFormat is an optional error format. If non-null, it will be printed - * using a {@link Formatter} with the provided arguments. - * @param args provides the arguments for errorFormat. - */ - void error(Throwable t, String errorFormat, Object... args); - - /** - * Prints a message as-is on stdout. - * <p/> - * Implementation should always display errors, independent of verbose mode. - * No prefix is used, the message is printed as-is after formatting. - * - * @param msgFormat is an optional error format. If non-null, it will be printed - * using a {@link Formatter} with the provided arguments. - * @param args provides the arguments for msgFormat. - */ - void printf(String msgFormat, Object... args); -} diff --git a/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java b/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java index 1c9eff3..0a353f9 100644 --- a/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java +++ b/ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java @@ -18,7 +18,6 @@ package com.android.ide.common.rendering; import static com.android.ide.common.rendering.api.Result.Status.ERROR_REFLECTION; -import com.android.ide.common.log.ILogger; import com.android.ide.common.rendering.api.Bridge; import com.android.ide.common.rendering.api.Capability; import com.android.ide.common.rendering.api.DrawableParams; @@ -43,6 +42,7 @@ import com.android.layoutlib.api.IProjectCallback; import com.android.layoutlib.api.IResourceValue; import com.android.layoutlib.api.IXmlPullParser; import com.android.resources.ResourceType; +import com.android.utils.ILogger; import java.awt.image.BufferedImage; import java.io.File; diff --git a/ide_common/src/com/android/ide/common/resources/FrameworkResources.java b/ide_common/src/com/android/ide/common/resources/FrameworkResources.java index 4d8e681..18bbc10 100755 --- a/ide_common/src/com/android/ide/common/resources/FrameworkResources.java +++ b/ide_common/src/com/android/ide/common/resources/FrameworkResources.java @@ -20,10 +20,10 @@ import static com.android.AndroidConstants.FD_RES_VALUES; import com.android.annotations.NonNull; import com.android.annotations.Nullable; -import com.android.ide.common.log.ILogger; import com.android.io.IAbstractFile; import com.android.io.IAbstractFolder; import com.android.resources.ResourceType; +import com.android.utils.ILogger; import org.kxml2.io.KXmlParser; import org.xmlpull.v1.XmlPullParser; @@ -36,10 +36,8 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.EnumMap; -import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Map.Entry; /** * Framework resources repository. |