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
9
* Red Hat - initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.linuxtools.internal.callgraph.core;
13
public final class PluginConstants {
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$
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$
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$
38
* Sets the absolute path of the Plugin folder and updates
39
* the PLUGIN_LOCATION.
43
public static void setPluginLocation(String loc) {
44
PLUGIN_LOCATION = loc;
47
public static String getPluginLocation() {
48
if (PLUGIN_LOCATION.length() < 1)
49
PluginConstants.setPluginLocation(CallgraphCorePlugin.getDefault().getPluginLocation());
51
return PLUGIN_LOCATION;
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;
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;