Lines 926-932
Link Here
|
926 |
|
926 |
|
927 |
/** |
927 |
/** |
928 |
* Returns the line separator found in the given text. |
928 |
* Returns the line separator found in the given text. |
929 |
* If it is null, or not found return the line delimitor for the given project. |
929 |
* If it is null, or not found return the line delimiter for the given project. |
930 |
* If the project is null, returns the line separator for the workspace. |
930 |
* If the project is null, returns the line separator for the workspace. |
931 |
* If still null, return the system line separator. |
931 |
* If still null, return the system line separator. |
932 |
*/ |
932 |
*/ |
Lines 940-960
Link Here
|
940 |
return lineSeparator; |
940 |
return lineSeparator; |
941 |
} |
941 |
} |
942 |
|
942 |
|
943 |
// line delimiter in project preference |
943 |
if (Platform.isRunning()) { |
944 |
IScopeContext[] scopeContext; |
944 |
// line delimiter in project preference |
945 |
if (project != null) { |
945 |
IScopeContext[] scopeContext; |
946 |
scopeContext= new IScopeContext[] { new ProjectScope(project.getProject()) }; |
946 |
if (project != null) { |
947 |
lineSeparator= Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, null, scopeContext); |
947 |
scopeContext= new IScopeContext[] { new ProjectScope(project.getProject()) }; |
|
|
948 |
lineSeparator= Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, null, scopeContext); |
949 |
if (lineSeparator != null) |
950 |
return lineSeparator; |
951 |
} |
952 |
|
953 |
// line delimiter in workspace preference |
954 |
scopeContext= new IScopeContext[] { new InstanceScope() }; |
955 |
lineSeparator = Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, null, scopeContext); |
948 |
if (lineSeparator != null) |
956 |
if (lineSeparator != null) |
949 |
return lineSeparator; |
957 |
return lineSeparator; |
950 |
} |
958 |
} |
951 |
|
959 |
|
952 |
// line delimiter in workspace preference |
|
|
953 |
scopeContext= new IScopeContext[] { new InstanceScope() }; |
954 |
lineSeparator = Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, null, scopeContext); |
955 |
if (lineSeparator != null) |
956 |
return lineSeparator; |
957 |
|
958 |
// system line delimiter |
960 |
// system line delimiter |
959 |
return org.eclipse.jdt.internal.compiler.util.Util.LINE_SEPARATOR; |
961 |
return org.eclipse.jdt.internal.compiler.util.Util.LINE_SEPARATOR; |
960 |
} |
962 |
} |