Remove factors concerning build type "Dynamic Analyzer" 45/29245/1
authorjungwook.ryu <jungwook.ryu@samsung.com>
Thu, 23 Oct 2014 07:35:02 +0000 (16:35 +0900)
committerjungwook.ryu <jungwook.ryu@samsung.com>
Thu, 23 Oct 2014 07:35:02 +0000 (16:35 +0900)
Change-Id: Idad91d41c6de598a70dcb8a53f1dc023db0876f7
Signed-off-by: jungwook.ryu <jungwook.ryu@samsung.com>
org.tizen.dynamicanalysis.ide.eplugin/plugin.xml
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/Activator.java
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/DynamicOptionValueHandler.java
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/PlatformChangingHandler.java [deleted file]
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDAShortcut.java

index cbc8568..800ebf3 100755 (executable)
@@ -7,83 +7,8 @@
             class="org.tizen.dynamicanalysis.ide.eplugin.communication.ServerStartup">
       </startup>
    </extension>
-   
-   <extension point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
-         <toolChain            
-            id="org.tizen.nativecpp.toolchain.sbi.gnu.da" 
-            isAbstract="false"            
-            superClass="org.tizen.nativecpp.toolchain.sbi.gnu">
-            <tool
-               id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da" 
-               isAbstract="false" 
-               superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
-               <option
-                  category="gnu.cpp.compiler.category.other" 
-                  command="-g -pg -funwind-tables -finstrument-functions" 
-                  defaultValue="true" 
-                  id="sbi.gnu.cpp.compiler.option.misc.pic.da" 
-                  name="Dynamic Analyzer Option" 
-                  superClass="sbi.gnu.cpp.compiler.option.misc.pic.cpp" 
-                  valueType="boolean">
-               </option>
-            </tool>
-            <tool
-               id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.da" 
-               isAbstract="false" 
-               superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
-               <option
-                  category="gnu.cpp.link.category.options" 
-                  command="-pg" 
-                  defaultValue="true" 
-                  id="sbi.gnu.cpp.linker.option.da_flag.cpp" 
-                  name="Dynamic Analyzer Option"
-                                 superClass="gnu.cpp.link.option.shared"
-                                 valueHandler="org.tizen.dynamicanalysis.ide.eplugin.launch.DynamicOptionValueHandler"
-                  valueType="boolean">
-               </option>
-            </tool>
-     </toolChain>        
-         <projectType
-             buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" 
-            id="org.tizen.nativecpp.target.sbi.gcc45.app.da">
-             <configuration
-                    buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"
-                   id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.da" 
-                   name="Dynamic Analyzer" 
-                   parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug">
-                <toolChain
-                      id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.da"
-                      superClass="org.tizen.nativecpp.toolchain.sbi.gnu.da">
-                </toolChain>
-            </configuration>
-         </projectType>
-         <projectType
-               buildArtefactType="org.tizen.nativecpp.buildArtefactType.app"
-               id="org.tizen.nativecpp.target.sbi.gcc45.app.da.2.0">
-            <configuration
-                  id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da"
-                  name="DA-Tizen-Emulator"
-                  parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator">
-               <toolChain
-                     id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.emulator.da"
-                     isAbstract="true"
-                     superClass="org.tizen.nativecpp.toolchain.sbi.gnu.da">
-               </toolChain>
-            </configuration>
-            <configuration
-                  id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da"
-                  name="DA-Tizen-Device"
-                  parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device">
-               <toolChain
-                     id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.device.da"
-                     isAbstract="true"
-                     superClass="org.tizen.nativecpp.toolchain.sbi.gnu.da">
-               </toolChain>
-            </configuration>
-         </projectType>
-    </extension>
     
-    <extension
+       <extension
         point="org.eclipse.debug.ui.launchShortcuts">
         <shortcut
               class="org.tizen.dynamicanalysis.ide.eplugin.launch.TizenNativeApplicationDAShortcut"
        </launchConfigurationTabGroup>
     </extension>
     
-    <extension
-          point="org.eclipse.debug.ui.launchConfigurationTabs">
-       <tab
-             class="org.tizen.dynamicanalysis.ide.eplugin.launch.TizenNativeApplicationDAMainTab"
-             group="%daProfileConfigTabGroupID"
-             id="%daProfileConfigTabsID"
-             name="Tizen Main Tab">
-             <associatedDelegate delegate="%daProfileDelegateID"/>
-       </tab>
-    </extension>
     
     <extension
           id="org.tizen.dynamicanalysis.ide.eplugin.dacustom"
index 91ebc26..35db85c 100644 (file)
@@ -29,20 +29,12 @@ package org.tizen.dynamicanalysis.ide.eplugin;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.tizen.dynamicanalysis.ide.eplugin.communication.ServerStartup;
-import org.tizen.dynamicanalysis.ide.eplugin.launch.PlatformChangingHandler;
-import org.tizen.nativecommon.build.PlatformChangingManager;
-import org.tizen.nativecommon.build.ui.IPlatformChangedListener;
 
 public class Activator implements BundleActivator {
        public static final String PLUGIN_ID = "org.tizen.dynamicanalyzer";//$NON-NLS-1$
-       public static final String DA_BUILD_CONFIGURATION_NAME_EMULATOR = "DA-Tizen-Emulator";//$NON-NLS-1$
-       public static final String DA_BUILD_CONFIGURATION_NAME_DEVICE = "DA-Tizen-Device";//$NON-NLS-1$
-       public static final String DA_BUILD_CONFIGURATION_NAME_PROFILE = "Profile";//$NON-NLS-1$
-       public static final String DA_BUILD_CONFIGURATION_NAME = "Dynamic Analyzer";//$NON-NLS-1$
        public static final String PROFILE_MODE = "profile";//$NON-NLS-1$
 
        private static BundleContext context;
-       public static IPlatformChangedListener listner = new PlatformChangingHandler(DA_BUILD_CONFIGURATION_NAME);
 
        static BundleContext getContext() {
                return context;
@@ -54,7 +46,6 @@ public class Activator implements BundleActivator {
         */
        public void start(BundleContext bundleContext) throws Exception {
                Activator.context = bundleContext;
-               PlatformChangingManager.addListener(listner);
        }
 
        /*
index 0f93ac5..6356321 100644 (file)
@@ -33,7 +33,6 @@ import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
 import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
 import org.eclipse.cdt.managedbuilder.core.IOption;
 import org.eclipse.cdt.managedbuilder.internal.core.FolderInfo;
-import org.tizen.dynamicanalysis.ide.eplugin.Activator;
 
 @SuppressWarnings("restriction")
 public class DynamicOptionValueHandler implements IManagedOptionValueHandler {
@@ -57,9 +56,6 @@ public class DynamicOptionValueHandler implements IManagedOptionValueHandler {
                } else {
                        config = (IConfiguration) configuration;
                }
-               
-               Activator.listner.platformChanged(config);
-
                return false;
        }
 
diff --git a/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/PlatformChangingHandler.java b/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/PlatformChangingHandler.java
deleted file mode 100644 (file)
index 4895b76..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Jungwook Ryu <jungwook.ryu@samsung.com>
- * Sanghyun Lee <sanghyunnim.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- * 
- * 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.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */ 
-
-package org.tizen.dynamicanalysis.ide.eplugin.launch;
-
-import org.eclipse.cdt.managedbuilder.core.IConfiguration;
-import org.tizen.nativecommon.build.CommonConfigurationManager;
-import org.tizen.nativecommon.build.ui.IPlatformChangedListener;
-
-public class PlatformChangingHandler implements IPlatformChangedListener {
-
-       private String configName = "";
-       
-       public PlatformChangingHandler() {
-               
-       }
-       
-       public PlatformChangingHandler(String c) {
-               configName = c;
-       }
-       
-       @Override
-       public String getConfigName() {
-               return configName;
-       }
-       
-       @Override
-       public void platformChanged(IConfiguration config) {
-               String linklib = "daprobe";//$NON-NLS-1$
-               String customchartSymbol = "_USE_DA_"; //$NON-NLS-1$
-               String libPath = "\"${SDK_INSTALL_PATH}/library/da";//$NON-NLS-1$
-               String deviceLibPath = libPath + "/arm\"";
-               String emulatorLibPath = libPath + "/x86\"";
-               
-               String targetStr = "";
-               String replacementStr = "";
-               
-               String arch = CommonConfigurationManager.getArchitecture(config);
-               
-               // Default setting is emulator arch
-               if (CommonConfigurationManager.isDeviceArch(arch)) {
-                       targetStr = emulatorLibPath;
-                       replacementStr = deviceLibPath;                                         
-               } else {                        
-                       targetStr = deviceLibPath;
-                       replacementStr = emulatorLibPath;
-               }
-
-               String includePath = "\"${SDK_INSTALL_PATH}/library\"";//$NON-NLS-1$
-               CommonConfigurationManager.appendIncludePathToCompiler(config, includePath);
-               CommonConfigurationManager.appendLibraryToLinker(config, linklib);
-               CommonConfigurationManager.replaceLinkPathsToLinker(config, targetStr, replacementStr);
-               CommonConfigurationManager.appendPreprocessorSymbolToCompiler(config, customchartSymbol);
-       }
-
-}
index 12a46db..e85558b 100644 (file)
@@ -635,19 +635,10 @@ public class TizenNativeApplicationDADelegate extends
        private void rollBackBuildConfigSetting(IProject project) {
                String prevBuildConfigName = TizenNativeApplicationDAShortcut
                                .getPrevBuildConfigName();
-               String prevDAConfigArch = TizenNativeApplicationDAShortcut
-                               .getPrevDAConfigArch();
-
                if (prevBuildConfigName != null) {
                        ManagedBuildManager.getBuildInfo(project).setDefaultConfiguration(
                                        prevBuildConfigName);
                }
-
-               if (prevDAConfigArch != null) {
-                       PlatformChangingManager.changePlatform(project,
-                                       Activator.DA_BUILD_CONFIGURATION_NAME, prevDAConfigArch,
-                                       false);
-               }
        }
 
        @Override
index ef76d3b..3e55e0a 100755 (executable)
@@ -46,7 +46,6 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationType;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -64,22 +63,17 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
 import org.tizen.common.connection.ConnectionPlugin;
 import org.tizen.common.gom.launch.GomLaunchData;
 import org.tizen.common.util.DialogUtil;
 import org.tizen.common.util.OSChecker;
 import org.tizen.common.util.SWTUtil;
-import org.tizen.dynamicanalysis.ide.eplugin.Activator;
 import org.tizen.dynamicanalysis.ide.eplugin.DALog;
 import org.tizen.dynamicanalysis.ide.eplugin.nl.Labels;
 import org.tizen.nativecommon.IXMLStore;
 import org.tizen.nativecommon.ProjectUtil;
 import org.tizen.nativecommon.build.CommonBuildConstants;
 import org.tizen.nativecommon.build.CommonBuildMessages;
-import org.tizen.nativecommon.build.CommonConfigurationManager;
-import org.tizen.nativecommon.build.PlatformChangingManager;
 import org.tizen.nativecommon.build.SmartBuildInterface;
 import org.tizen.nativecommon.launch.LaunchUtils;
 import org.tizen.nativecommon.launch.TizenLaunchConfiguration;
@@ -96,13 +90,11 @@ import org.tizen.nativeplatform.util.PackageUtil;
 import org.tizen.nativeplatform.util.PlatformLaunchUtil;
 import org.tizen.nativeplatform.util.PlatformProjectUtil;
 import org.tizen.nativeplatform.views.model.PlatformRootstrap;
-import org.tizen.sdblib.Arch;
 import org.tizen.sdblib.IDevice;
 import org.tizen.sdblib.util.ArrayUtil;
 
 public class TizenNativeApplicationDAShortcut extends TizenLaunchShortcut {
        private static String prevBuildConfigName = null;
-       private static String prevDAConfigArch = null;
        
        /* for platform project */
        protected PkgCommandTarget target = null;
@@ -120,13 +112,6 @@ public class TizenNativeApplicationDAShortcut extends TizenLaunchShortcut {
                return returnValue;
        }
 
-       static String getPrevDAConfigArch() {
-               String returnVaString = prevDAConfigArch;
-               prevDAConfigArch = null;
-
-               return returnVaString;
-       }
-       
        @Override
        public void launch(ISelection selection, String mode) {
                IStructuredSelection structuredSelection = (IStructuredSelection) selection;
@@ -152,7 +137,6 @@ public class TizenNativeApplicationDAShortcut extends TizenLaunchShortcut {
                                        DALog.dlgErrorMessage(Labels.MESSAGE_ERROR,
                                                        Labels.MESSAGE_NOT_SUPPORT_IME_PROJECT);
                                } else {
-                                       setDABuildConfig(project);
                                        searchAndLaunch(((IStructuredSelection) selection).toArray(),
                                                        mode);
                                }
@@ -180,7 +164,6 @@ public class TizenNativeApplicationDAShortcut extends TizenLaunchShortcut {
                                        DALog.dlgErrorMessage(Labels.MESSAGE_ERROR,
                                                        Labels.MESSAGE_NOT_SUPPORT_IME_PROJECT);
                                } else {
-                                       setDABuildConfig(project);
                                        searchAndLaunch(new Object[] { editor.getEditorInput() }, mode);
                                }
                        } catch (CoreException e) {
@@ -268,43 +251,6 @@ public class TizenNativeApplicationDAShortcut extends TizenLaunchShortcut {
                return false;
        }
 
-       private void setDABuildConfig(IProject project) throws CoreException {
-               IDevice device = LaunchUtils.getCurrentDeployDevice();
-               if (device == null) {
-                       throw new CoreException(new Status(Status.ERROR,
-                                       Activator.PLUGIN_ID, Status.INFO,
-                                       TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE, null));
-               }
-
-               prevBuildConfigName = ManagedBuildManager.getBuildInfo(project)
-                               .getConfigurationName();
-
-               String configName;
-               IConfiguration daConfig = PlatformChangingManager
-                               .getConfigurationByName(project,
-                                               Activator.DA_BUILD_CONFIGURATION_NAME);
-
-               if (daConfig != null) {
-                       prevDAConfigArch = CommonConfigurationManager
-                                       .getArchitecture(daConfig);
-                       configName = Activator.DA_BUILD_CONFIGURATION_NAME;
-               } else {
-                       daConfig = PlatformChangingManager.getConfigurationByName(project,
-                                       Activator.DA_BUILD_CONFIGURATION_NAME_PROFILE);
-                       if (daConfig != null) {
-                               configName = Activator.DA_BUILD_CONFIGURATION_NAME_PROFILE;
-                       } else {
-                               if (device.getArch() == Arch.X86) {
-                                       configName = Activator.DA_BUILD_CONFIGURATION_NAME_EMULATOR;
-                               } else {
-                                       configName = Activator.DA_BUILD_CONFIGURATION_NAME_DEVICE;
-                               }
-                       }
-               }
-
-               PlatformChangingManager.changePlatform(project, configName, device
-                               .getArch().getArch());
-       }
 
        private void rollBackBuildConfigSetting(IProject project) {
                if (prevBuildConfigName != null) {
@@ -312,13 +258,6 @@ public class TizenNativeApplicationDAShortcut extends TizenLaunchShortcut {
                                        prevBuildConfigName);
                        prevBuildConfigName = null;
                }
-
-               if (prevDAConfigArch != null) {
-                       PlatformChangingManager.changePlatform(project,
-                                       Activator.DA_BUILD_CONFIGURATION_NAME, prevDAConfigArch,
-                                       false);
-                       prevDAConfigArch = null;
-               }
        }
 
        @Override