~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/PluginConstants.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2012-06-29 12:07:30 UTC
  • Revision ID: package-import@ubuntu.com-20120629120730-bfri1xys1i71dpn6
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2009 Red Hat, Inc.
 
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
 *     Red Hat - initial API and implementation
 
10
 *******************************************************************************/
 
11
package org.eclipse.linuxtools.internal.callgraph.core;
 
12
 
 
13
public final class PluginConstants {
 
14
        
 
15
        private static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
 
16
        public static final String CONFIGURATION_TYPE_ID = "org.eclipse.linuxtools.callgraph.launch.systemtapLaunch";    //$NON-NLS-1$
 
17
        public static final String PARSER_CLASS = "org.eclipse.linuxtools.callgraph.core.parser"; //$NON-NLS-1$
 
18
        public static final String PARSER_RESOURCE = "org.eclipse.linuxtools.callgraph.core"; //$NON-NLS-1$
 
19
        public static final String PARSER_NAME = "parser";  //$NON-NLS-1$
 
20
        public static final String VIEW_CLASS = "org.eclipse.linuxtools.callgraph.core.view"; //$NON-NLS-1$
 
21
        public static final String VIEW_RESOURCE = "org.eclipse.ui"; //$NON-NLS-1$
 
22
        public static final String VIEW_NAME = "views";  //$NON-NLS-1$
 
23
        public static final String ATTR_CLASS = "class"; //$NON-NLS-1$
 
24
        public static final String ATTR_REALTIME = "realtime"; //$NON-NLS-1$
 
25
        public static final String VAL_TRUE = "true"; //$NON-NLS-1$
 
26
        
 
27
        public static final String NEW_LINE = "\n"; //$NON-NLS-1$
 
28
        public static final int MAX_ERRORS = 500;       //Maximum number of errors to tolerate
 
29
        public static int SYSTEMTAP_OPTIONS_TAB_HORIZONTAL_SPACING = 30;
 
30
        public static String STAP_PATH = "stap"; //$NON-NLS-1$
 
31
        
 
32
        public static final String DEFAULT_VIEW_ID = "org.eclipse.linuxtools.callgraph.core.staptextview"; //$NON-NLS-1$
 
33
        public static final String DEFAULT_PARSER_ID = "org.eclipse.linuxtools.callgraph.core.systemtaptextparser"; //$NON-NLS-1$
 
34
        private static String DEFAULT_OUTPUT = ""; //$NON-NLS-1$
 
35
        private static String STAP_GRAPH_DEFAULT_IO_PATH = ""; //$NON-NLS-1$
 
36
        
 
37
        /**
 
38
         * Sets the absolute path of the Plugin folder and updates
 
39
         * the PLUGIN_LOCATION.
 
40
         * 
 
41
         * @param loc
 
42
         */
 
43
        public static void setPluginLocation(String loc) {
 
44
                PLUGIN_LOCATION = loc;
 
45
        }
 
46
 
 
47
        public static String getPluginLocation() {
 
48
                if (PLUGIN_LOCATION.length() < 1)
 
49
                        PluginConstants.setPluginLocation(CallgraphCorePlugin.getDefault().getPluginLocation());
 
50
                
 
51
                return PLUGIN_LOCATION;
 
52
        }
 
53
 
 
54
        public static String getDefaultOutput() {
 
55
                if (DEFAULT_OUTPUT.length() < 1)
 
56
                        DEFAULT_OUTPUT = CallgraphCorePlugin.getDefault().getStateLocation().toString()+"/"; //$NON-NLS-1$
 
57
                return DEFAULT_OUTPUT;
 
58
        }
 
59
        
 
60
        public static String getDefaultIOPath() {
 
61
                if (STAP_GRAPH_DEFAULT_IO_PATH.length() < 1)
 
62
                        STAP_GRAPH_DEFAULT_IO_PATH = CallgraphCorePlugin.getDefault().getStateLocation().toString()+"/callgraph.out"; //$NON-NLS-1$
 
63
                return STAP_GRAPH_DEFAULT_IO_PATH;
 
64
        }
 
65
        
 
66
        
 
67
}