Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance syntax highlights for object members (#1684) #1694

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading