1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-07 16:26:11 +02:00

Move Mutex to rse.services/src, set compliance to J2SE-1.4

This commit is contained in:
Martin Oberhuber 2006-08-17 09:23:32 +00:00
parent 4b344fb0bd
commit 4aab60f8fd
9 changed files with 65 additions and 8 deletions

View file

@ -1,8 +1,8 @@
#Fri Jul 07 11:19:10 CEST 2006
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
org.eclipse.jdt.core.compiler.source=1.4
org.eclipse.jdt.core.compiler.source=1.3

View file

@ -33,6 +33,7 @@ import com.jcraft.jsch.Session;
import com.jcraft.jsch.SftpATTRS;
import com.jcraft.jsch.SftpProgressMonitor;
import org.eclipse.rse.services.Mutex;
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.AbstractFileService;

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="clientserver"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1 @@
org.eclipse.rse.services/debug = true

View file

@ -0,0 +1,8 @@
#Fri Jul 07 11:19:10 CEST 2006
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
org.eclipse.jdt.core.compiler.source=1.3

View file

@ -0,0 +1,7 @@
#Fri Jul 07 11:19:10 CEST 2006
eclipse.preferences.version=1
internal.default.compliance=user
org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=java;javax;org;com;org.eclipse.rse;
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.staticondemandthreshold=99

View file

@ -21,3 +21,4 @@ Export-Package: org.eclipse.rse.services,
org.eclipse.rse.services.processes,
org.eclipse.rse.services.search,
org.eclipse.rse.services.shells
Bundle-RequiredExecutionEnvironment: J2SE-1.4

View file

@ -16,8 +16,13 @@
package org.eclipse.rse.services;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
import org.osgi.framework.BundleContext;
@ -72,5 +77,41 @@ public class Activator extends Plugin {
IStatus status = new Status(IStatus.ERROR, id, 0, "Unexpected exception", t);
log.log(status);
}
//<tracing code>----------------------------------------------------
private static Boolean fTracingOn = null;
public static boolean isTracingOn() {
if (fTracingOn==null) {
String id = plugin.getBundle().getSymbolicName();
String val = Platform.getDebugOption(id + "/debug"); //$NON-NLS-1$
if ("true".equals(val)) { //$NON-NLS-1$
fTracingOn = Boolean.TRUE;
} else {
fTracingOn = Boolean.FALSE;
}
}
return fTracingOn.booleanValue();
}
public static String getTimestamp() {
try {
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$
return formatter.format(new Date());
} catch (Exception e) {
// If there were problems writing out the date, ignore and
// continue since that shouldn't stop us from logging the rest
// of the information
}
return Long.toString(System.currentTimeMillis());
}
public static void trace(String msg) {
if (isTracingOn()) {
String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg; //$NON-NLS-1$ //$NON-NLS-2$
System.out.println(fullMsg);
System.out.flush();
}
}
//</tracing code>---------------------------------------------------
}

View file

@ -9,7 +9,7 @@
* Martin Oberhuber (Wind River) - initial API and implementation
*******************************************************************************/
package org.eclipse.rse.services.ssh.files;
package org.eclipse.rse.services;
import java.util.Iterator;
import java.util.LinkedList;
@ -17,8 +17,6 @@ import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.services.ssh.Activator;
/**
* A Mutual Exclusion Lock for Threads that need to access a resource
* in a serialized manner.