Skip to content

Commit

Permalink
Enhance syntax highlights for object members (eclipse-birt#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
speckyspooky committed May 18, 2024
1 parent 3437eb3 commit 6d238e4
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004 Actuate Corporation.
* Copyright (c) 2004 Actuate Corporation, 2024 others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -10,6 +10,7 @@
*
* Contributors:
* Actuate Corporation - initial API and implementation
* Thomas Gutmann - additional syntax highlighting
*******************************************************************************/

package org.eclipse.birt.report.designer.internal.ui.script;
Expand All @@ -25,6 +26,7 @@
import org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler;
import org.eclipse.birt.report.designer.util.DEUtil;
import org.eclipse.birt.report.model.api.metadata.IClassInfo;
import org.eclipse.birt.report.model.api.metadata.IMemberInfo;
import org.eclipse.birt.report.model.api.metadata.IMethodInfo;
import org.eclipse.jface.text.rules.EndOfLineRule;
import org.eclipse.jface.text.rules.IPredicateRule;
Expand Down Expand Up @@ -195,10 +197,15 @@ private void fetchJSCommonObjectsMethods() {
this.globalObjectTokens.add(classInfo.getName());

List<IMethodInfo> resultMethodList = classInfo.getMethods();
for (Iterator<IMethodInfo> mIter = resultMethodList.iterator(); mIter.hasNext();) {
IMethodInfo methodInfo = mIter.next();
for (Iterator<IMethodInfo> methodIter = resultMethodList.iterator(); methodIter.hasNext();) {
IMethodInfo methodInfo = methodIter.next();
this.keywordMethods.add(methodInfo.getName());
}
List<IMemberInfo> resultMemberList = classInfo.getMembers();
for (Iterator<IMemberInfo> memberIter = resultMemberList.iterator(); memberIter.hasNext();) {
IMemberInfo memberInfo = memberIter.next();
this.keywordMethods.add(memberInfo.getName());
}
}
}

Expand Down

0 comments on commit 6d238e4

Please sign in to comment.