Commit 172e5373 authored by Arpad Lovassy's avatar Arpad Lovassy
Browse files

bugfix2: Enter puts * after line comment


Signed-off-by: Arpad Lovassy's avatarzlovarp <arpad.lovassy@semcon.com>
parent a15a119e
......@@ -29,6 +29,7 @@ import org.eclipse.titan.designer.preferences.PreferenceConstants;
*
* @author Kristof Szabados
* @author Miklos Magyari
* @author Arpad Lovassy
*/
public final class SmartIndentAfterNewLineAutoEditStrategy extends GeneralTITANAutoEditStrategy {
......@@ -54,10 +55,14 @@ public final class SmartIndentAfterNewLineAutoEditStrategy extends GeneralTITANA
IDocumentExtension3 extension= (IDocumentExtension3) document;
final ITypedRegion region = extension.getPartition(extension.getPartitionings()[0], command.offset, false);
if (region.getType().equals(PartitionScanner.TTCN3_COMMENT)) {
// contains the actual trimmed line comment or multiline block comment
final String regionText = document.get(region.getOffset(), region.getLength()).trim();
if (! regionText.startsWith("//")) {
isInsideComment = true;
if (regionText.startsWith("/*")) {
final IRegion lineRegion = document.getLineInformation(document.getLineOfOffset(command.offset));
// contains the actual trimmed source line
final String lineText = document.get(lineRegion.getOffset(), lineRegion.getLength()).trim();
if (lineText.startsWith("/*")) {
isExtraSpace = true;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment