mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'master' of git.labs.intellij.net:idea/community
This commit is contained in:
@@ -859,6 +859,8 @@ public class CompileDriver {
|
||||
throw new ExitException(ExitStatus.CANCELLED);
|
||||
}
|
||||
|
||||
DumbService.getInstance(myProject).waitForSmartMode();
|
||||
|
||||
if (snapshot == null || ContainerUtil.intersects(generatedTypes, compilerManager.getRegisteredInputTypes(translator))) {
|
||||
// rescan snapshot if previously generated files can influence the input of this compiler
|
||||
snapshot = ApplicationManager.getApplication().runReadAction(new Computable<VirtualFile[]>() {
|
||||
@@ -1318,6 +1320,7 @@ public class CompileDriver {
|
||||
finally {
|
||||
CompilerUtil.refreshIOFiles(filesToRefresh);
|
||||
if (!generatedFiles.isEmpty()) {
|
||||
DumbService.getInstance(myProject).waitForSmartMode();
|
||||
List<VirtualFile> vFiles = ApplicationManager.getApplication().runReadAction(new Computable<List<VirtualFile>>() {
|
||||
public List<VirtualFile> compute() {
|
||||
final ArrayList<VirtualFile> vFiles = new ArrayList<VirtualFile>(generatedFiles.size());
|
||||
@@ -1544,6 +1547,7 @@ public class CompileDriver {
|
||||
final List<FileProcessingCompiler.ProcessingItem> toProcess = new ArrayList<FileProcessingCompiler.ProcessingItem>();
|
||||
final Set<String> allUrls = new HashSet<String>();
|
||||
final IOException[] ex = {null};
|
||||
DumbService.getInstance(myProject).waitForSmartMode();
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class CompilerWorkspaceConfiguration implements PersistentStateComponent<
|
||||
public boolean AUTO_SHOW_ERRORS_IN_EDITOR = true;
|
||||
@Deprecated public boolean CLOSE_MESSAGE_VIEW_IF_SUCCESS = true;
|
||||
public boolean COMPILE_DEPENDENT_FILES = false;
|
||||
public boolean CLEAR_OUTPUT_DIRECTORY = false;
|
||||
public boolean CLEAR_OUTPUT_DIRECTORY = true;
|
||||
public boolean ASSERT_NOT_NULL = true;
|
||||
|
||||
public static CompilerWorkspaceConfiguration getInstance(Project project) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.intellij.debugger.jdi.LocalVariableProxyImpl;
|
||||
import com.intellij.debugger.jdi.StackFrameProxyImpl;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.project.IndexNotReadyException;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.psi.*;
|
||||
@@ -58,7 +59,11 @@ public class ContextUtil {
|
||||
// process already closed
|
||||
return null;
|
||||
}
|
||||
return positionManager.getSourcePosition(location);
|
||||
try {
|
||||
return positionManager.getSourcePosition(location);
|
||||
} catch (IndexNotReadyException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Settings Sett<caret> other
|
||||
@@ -0,0 +1 @@
|
||||
Settings Sett<caret> other
|
||||
@@ -0,0 +1 @@
|
||||
<a>Settings Sett<caret> other</a>
|
||||
@@ -0,0 +1 @@
|
||||
Settings Settings other
|
||||
@@ -0,0 +1 @@
|
||||
Settings Settings other
|
||||
@@ -0,0 +1 @@
|
||||
<a>Settings Settings <caret>other</a>
|
||||
@@ -0,0 +1,4 @@
|
||||
<root>
|
||||
<a value="Settings"/>
|
||||
<a value="Sett<caret>"></a>
|
||||
</root>
|
||||
@@ -0,0 +1,4 @@
|
||||
<root>
|
||||
<a value="Settings"/>
|
||||
<a value="Settings <caret>"></a>
|
||||
</root>
|
||||
@@ -0,0 +1,3 @@
|
||||
public class MyClass {
|
||||
String b = "My<caret>";
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
public class MyClass {
|
||||
String b = "MyHardVariant<caret>";
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public class MyClass {
|
||||
String b = "My";
|
||||
// pu<caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public class MyClass {
|
||||
String b = "My";
|
||||
// public <caret>
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
$test
|
||||
$te<caret>
|
||||
@@ -0,0 +1,2 @@
|
||||
$test
|
||||
$test <caret>
|
||||
@@ -0,0 +1,4 @@
|
||||
public class MyClass {
|
||||
|
||||
// comment <caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public class MyClass {
|
||||
|
||||
/** comment My<caret> */
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
public class MyClass {
|
||||
|
||||
/** comment MyClass <caret>*/
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.intellij.codeInsight.completion;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiLiteralExpression;
|
||||
import com.intellij.psi.PsiReference;
|
||||
import com.intellij.psi.PsiReferenceBase;
|
||||
import com.intellij.psi.impl.source.resolve.reference.PsiReferenceProviderBase;
|
||||
import com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry;
|
||||
import com.intellij.util.ProcessingContext;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: Maxim.Mossienko
|
||||
* Date: Oct 14, 2004
|
||||
* Time: 4:39:37 PM
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
public class WordCompletionTest extends CompletionTestCase {
|
||||
private static final String BASE_PATH = "/codeInsight/completion/word/";
|
||||
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return JavaTestUtil.getJavaTestDataPath();
|
||||
}
|
||||
|
||||
public void testKeyWordCompletion() throws Exception {
|
||||
configureByFile(BASE_PATH + "1.txt");
|
||||
checkResultByFile(BASE_PATH + "1_after.txt");
|
||||
|
||||
configureByFile(BASE_PATH + "1.properties");
|
||||
checkResultByFile(BASE_PATH + "1_after.properties");
|
||||
|
||||
configureByFile(BASE_PATH + "1.xml");
|
||||
checkResultByFile(BASE_PATH + "1_after.xml");
|
||||
|
||||
configureByFile(BASE_PATH + "2.xml");
|
||||
configureByFile(BASE_PATH + "2_after.xml");
|
||||
}
|
||||
|
||||
public void testNoWordCompletionForNonSoftReference() throws Throwable {
|
||||
final PsiReferenceProviderBase softProvider = new PsiReferenceProviderBase() {
|
||||
@NotNull
|
||||
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull final ProcessingContext context) {
|
||||
return new PsiReference[]{new PsiReferenceBase<PsiElement>(element) {
|
||||
public PsiElement resolve() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isSoft() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Object[] getVariants() {
|
||||
return new Object[]{"MySoftVariant"};
|
||||
}
|
||||
}};
|
||||
}
|
||||
};
|
||||
final PsiReferenceProviderBase hardProvider = new PsiReferenceProviderBase() {
|
||||
@NotNull
|
||||
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull final ProcessingContext context) {
|
||||
return new PsiReference[]{new PsiReferenceBase<PsiElement>(element) {
|
||||
public PsiElement resolve() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isSoft() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Object[] getVariants() {
|
||||
return new Object[]{"MyHardVariant"};
|
||||
}
|
||||
}};
|
||||
}
|
||||
};
|
||||
ReferenceProvidersRegistry.getInstance(getProject()).registerReferenceProvider(PsiLiteralExpression.class, softProvider);
|
||||
ReferenceProvidersRegistry.getInstance(getProject()).registerReferenceProvider(PsiLiteralExpression.class, hardProvider);
|
||||
|
||||
configureByFile(BASE_PATH + "3.java");
|
||||
checkResultByFile(BASE_PATH + "3_after.java");
|
||||
}
|
||||
|
||||
public void testComments() throws Throwable {
|
||||
configureByFile(BASE_PATH + "4.java");
|
||||
checkResultByFile(BASE_PATH + "4_after.java");
|
||||
}
|
||||
|
||||
public void testSpaceInComment() throws Throwable {
|
||||
configureByFile(BASE_PATH + "SpaceInComment.java");
|
||||
checkResultByFile(BASE_PATH + "SpaceInComment.java");
|
||||
}
|
||||
|
||||
public void testTextInComment() throws Throwable {
|
||||
configureByFile(BASE_PATH + "TextInComment.java");
|
||||
checkResultByFile(BASE_PATH + "TextInComment_after.java");
|
||||
}
|
||||
|
||||
public void testDollarsInPrefix() throws Throwable {
|
||||
configureByFile(BASE_PATH + getTestName(false) + ".txt");
|
||||
checkResultByFile(BASE_PATH + getTestName(false) + "_after.txt");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class BookmarkManager implements PersistentStateComponent<Element> {
|
||||
public void addTextBookmark(VirtualFile file, int lineIndex, String description) {
|
||||
Bookmark b = new Bookmark(myProject, file, lineIndex, description);
|
||||
myBus.syncPublisher(BookmarksListener.TOPIC).bookmarkAdded(b);
|
||||
myBookmarks.add(b);
|
||||
myBookmarks.add(0, b);
|
||||
}
|
||||
|
||||
public static String getAutoDescription(final Editor editor, final int lineIndex) {
|
||||
@@ -108,7 +108,7 @@ public class BookmarkManager implements PersistentStateComponent<Element> {
|
||||
if (findFileBookmark(file) != null) return;
|
||||
|
||||
Bookmark b = new Bookmark(myProject, file, description);
|
||||
myBookmarks.add(b);
|
||||
myBookmarks.add(0, b);
|
||||
myBus.syncPublisher(BookmarksListener.TOPIC).bookmarkAdded(b);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.speedSearch.FilteringListModel;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.Function;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -257,7 +258,7 @@ public class BookmarksAction extends AnAction implements DumbAware {
|
||||
final DefaultListModel model = new DefaultListModel();
|
||||
|
||||
for (Bookmark bookmark : BookmarkManager.getInstance(project).getValidBookmarks()) {
|
||||
model.insertElementAt(new BookmarkItem(bookmark), 0);
|
||||
model.addElement(new BookmarkItem(bookmark));
|
||||
}
|
||||
|
||||
if (bookmarkAtPlace == null) {
|
||||
@@ -601,11 +602,6 @@ public class BookmarksAction extends AnAction implements DumbAware {
|
||||
|
||||
b.setDescription(description);
|
||||
|
||||
DefaultListModel model = (DefaultListModel)myList.getModel();
|
||||
String fake = "Fake Element to make list re-count its size";
|
||||
model.addElement(fake);
|
||||
model.removeElement(fake);
|
||||
|
||||
myPopup.setUiVisible(true);
|
||||
myPopup.setSize(myPopup.getContent().getPreferredSize());
|
||||
}
|
||||
@@ -642,6 +638,12 @@ public class BookmarksAction extends AnAction implements DumbAware {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean notFiltered(JList list) {
|
||||
if (!(list.getModel() instanceof FilteringListModel)) return true;
|
||||
final FilteringListModel model = (FilteringListModel)list.getModel();
|
||||
return model.getOriginalModel().getSize() == model.getSize();
|
||||
}
|
||||
|
||||
private static class MoveBookmarkUpAction extends AnAction {
|
||||
private final Project myProject;
|
||||
private final JList myList;
|
||||
@@ -655,7 +657,7 @@ public class BookmarksAction extends AnAction implements DumbAware {
|
||||
|
||||
@Override
|
||||
public void update(AnActionEvent e) {
|
||||
e.getPresentation().setEnabled(getSelectedBookmarks(myList).size() == 1 && myList.getSelectedIndex() > 0);
|
||||
e.getPresentation().setEnabled(notFiltered(myList) && getSelectedBookmarks(myList).size() == 1 && myList.getSelectedIndex() > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -679,7 +681,7 @@ public class BookmarksAction extends AnAction implements DumbAware {
|
||||
@Override
|
||||
public void update(AnActionEvent e) {
|
||||
int modelSize = myList.getModel().getSize();
|
||||
if (modelSize == 0) {
|
||||
if (modelSize == 0 || !notFiltered(myList)) {
|
||||
e.getPresentation().setEnabled(false);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -591,10 +591,9 @@ public class FileBasedIndex implements ApplicationComponent {
|
||||
return; //indexed eagerly in foreground while building unindexed file list
|
||||
}
|
||||
|
||||
final ProgressManager progressManager = ProgressManager.getInstance();
|
||||
progressManager.checkCanceled(); // DumbModeAction.CANCEL
|
||||
ProgressManager.checkCanceled(); // DumbModeAction.CANCEL
|
||||
|
||||
final ProgressIndicator progressIndicator = progressManager.getProgressIndicator();
|
||||
final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
if (progressIndicator instanceof BackgroundableProcessIndicator) {
|
||||
final BackgroundableProcessIndicator indicator = (BackgroundableProcessIndicator)progressIndicator;
|
||||
if (indicator.getDumbModeAction() == DumbModeAction.WAIT) {
|
||||
|
||||
@@ -114,7 +114,6 @@ public class ActionUtil {
|
||||
presentation.putClientProperty(WAS_ENABLED_BEFORE_DUMB, enabledBeforeUpdate);
|
||||
}
|
||||
presentation.setEnabled(false);
|
||||
presentation.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.ui;
|
||||
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.ui.speedSearch.FilteringListModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
@@ -120,7 +121,7 @@ public class ListUtil {
|
||||
}
|
||||
|
||||
public static int moveSelectedItemsUp(JList list) {
|
||||
DefaultListModel model = (DefaultListModel)list.getModel();
|
||||
DefaultListModel model = getModel(list);
|
||||
int[] indices = list.getSelectedIndices();
|
||||
if (!canMoveSelectedItemsUp(list)) return 0;
|
||||
for(int i = 0; i < indices.length; i++){
|
||||
@@ -144,7 +145,7 @@ public class ListUtil {
|
||||
}
|
||||
|
||||
public static int moveSelectedItemsDown(JList list) {
|
||||
DefaultListModel model = (DefaultListModel)list.getModel();
|
||||
DefaultListModel model = getModel(list);
|
||||
int[] indices = list.getSelectedIndices();
|
||||
if (!canMoveSelectedItemsDown(list)) return 0;
|
||||
for(int i = indices.length - 1; i >= 0 ; i--){
|
||||
@@ -162,6 +163,14 @@ public class ListUtil {
|
||||
return indices.length;
|
||||
}
|
||||
|
||||
private static DefaultListModel getModel(JList list) {
|
||||
final ListModel model = list.getModel();
|
||||
if (model instanceof FilteringListModel) {
|
||||
return (DefaultListModel)((FilteringListModel)model).getOriginalModel();
|
||||
}
|
||||
return (DefaultListModel)model;
|
||||
}
|
||||
|
||||
public static boolean canMoveSelectedItemsDown(JList list) {
|
||||
ListModel model = list.getModel();
|
||||
int[] indices = list.getSelectedIndices();
|
||||
@@ -256,6 +265,7 @@ public class ListUtil {
|
||||
private static ListModelExtension getExtensions(ListModel model) {
|
||||
if (model instanceof DefaultListModel) return DEFAULT_MODEL;
|
||||
if (model instanceof SortedListModel) return SORTED_MODEL;
|
||||
if (model instanceof FilteringListModel) return FILTERED_MODEL;
|
||||
|
||||
if (model == null) LOG.assertTrue(false);
|
||||
else LOG.assertTrue(false, "Unknown model class: " + model.getClass().getName());
|
||||
@@ -286,4 +296,14 @@ public class ListUtil {
|
||||
model.remove(index);
|
||||
}
|
||||
};
|
||||
|
||||
private static final ListModelExtension FILTERED_MODEL = new ListModelExtension<FilteringListModel>() {
|
||||
public Object get(FilteringListModel model, int index) {
|
||||
return model.getElementAt(index);
|
||||
}
|
||||
|
||||
public void remove(FilteringListModel model, int index) {
|
||||
model.remove(index);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+15
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.ui;
|
||||
|
||||
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
|
||||
@@ -31,7 +31,6 @@ import java.util.List;
|
||||
* @author max
|
||||
*/
|
||||
public class FilteringListModel<T> extends AbstractListModel {
|
||||
private final JList myList;
|
||||
private final ListModel myOriginalModel;
|
||||
private final List<T> myData = new ArrayList<T>();
|
||||
private Condition<T> myCondition = null;
|
||||
@@ -52,7 +51,6 @@ public class FilteringListModel<T> extends AbstractListModel {
|
||||
};
|
||||
|
||||
protected FilteringListModel(JList list) {
|
||||
myList = list;
|
||||
myOriginalModel = list.getModel();
|
||||
myOriginalModel.addListDataListener(myListDataListener);
|
||||
|
||||
@@ -111,4 +109,12 @@ public class FilteringListModel<T> extends AbstractListModel {
|
||||
public boolean contains(T value) {
|
||||
return myData.contains(value);
|
||||
}
|
||||
|
||||
public ListModel getOriginalModel() {
|
||||
return myOriginalModel;
|
||||
}
|
||||
|
||||
public void remove(int index) {
|
||||
((DefaultListModel)myOriginalModel).removeElement(myData.get(index));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ public class PerformanceWatcher implements ApplicationComponent {
|
||||
}
|
||||
});
|
||||
|
||||
myLogDir = new File(PathManager.getSystemPath() + "/log/threadDumps-" + myDateFormat.format(new Date())
|
||||
+ "-" + ApplicationInfo.getInstance().getBuildNumber());
|
||||
myLogDir = new File(PathManager.getLogPath() + "/threadDumps-" + myDateFormat.format(new Date())
|
||||
+ "-" + ApplicationInfo.getInstance().getBuild().asString());
|
||||
myLogDir.mkdirs();
|
||||
myCurHangLogDir = myLogDir;
|
||||
myThreadMXBean = ManagementFactory.getThreadMXBean();
|
||||
|
||||
+9
-1
@@ -16,6 +16,7 @@
|
||||
package com.intellij.openapi.components.impl.stores;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ex.ApplicationEx;
|
||||
import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
||||
import com.intellij.openapi.components.*;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
@@ -48,6 +49,13 @@ public abstract class StateStorageManagerImpl implements StateStorageManager, Di
|
||||
|
||||
private static final Logger LOG = Logger.getInstance("#" + StateStorageManagerImpl.class.getName());
|
||||
|
||||
private static final boolean ourHeadlessEnvironment;
|
||||
|
||||
static {
|
||||
final ApplicationEx ex = ApplicationManagerEx.getApplicationEx();
|
||||
ourHeadlessEnvironment = ex.isHeadlessEnvironment() || ex.isUnitTestMode();
|
||||
}
|
||||
|
||||
private final Map<String, String> myMacros = new HashMap<String, String>();
|
||||
private final Map<String, StateStorage> myStorages = new HashMap<String, StateStorage>();
|
||||
private final Map<String, StateStorage> myPathToStorage = new HashMap<String, StateStorage>();
|
||||
@@ -269,7 +277,7 @@ public abstract class StateStorageManagerImpl implements StateStorageManager, Di
|
||||
}
|
||||
|
||||
final String extension = FileUtil.getExtension(new File(expandedFile).getName());
|
||||
if (extension.length() == 0) {
|
||||
if (!ourHeadlessEnvironment && extension.length() == 0) {
|
||||
throw new IllegalArgumentException("Extension is missing for storage file: " + expandedFile);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,11 +135,13 @@ public class KeymapPanel extends JPanel implements SearchableConfigurable {
|
||||
private JPanel createKeymapListPanel() {
|
||||
JPanel panel = new JPanel();
|
||||
panel.setLayout(new GridBagLayout());
|
||||
panel.add(new JLabel(KeyMapBundle.message("keymaps.border.factory.title")), new GridBagConstraints(0,0, 1, 1, 0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,2,0,0), 0,0));
|
||||
|
||||
myKeymapList = new JComboBox(myKeymapListModel);
|
||||
myKeymapList.setEditor(new MyEditor());
|
||||
myKeymapList.setRenderer(new MyKeymapRenderer());
|
||||
JLabel keymapLabel = new JLabel(KeyMapBundle.message("keymaps.border.factory.title"));
|
||||
keymapLabel.setLabelFor(myKeymapList);
|
||||
panel.add(keymapLabel, new GridBagConstraints(0,0, 1, 1, 0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,2,0,0), 0,0));
|
||||
panel.add(myKeymapList, new GridBagConstraints(1,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0,4,0,0),0,0));
|
||||
|
||||
panel.add(createKeymapButtonsPanel(), new GridBagConstraints(2,0,1,1,0,0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,0,0,0),0,0));
|
||||
|
||||
@@ -1144,8 +1144,8 @@ group.ProjectViewPopupMenu.text=Project View Popup Menu
|
||||
group.FavoritesViewPopupMenu.text=Favorites View Popup Menu
|
||||
group.CommanderViewPopupMenu.text=Commander View Popup Menu
|
||||
group.NavbarPopupMenu.text=Navigation Bar
|
||||
action.NewInspectionsInLatestVersion.text=What's new in IDEA 8
|
||||
action.NewInspectionsInLatestVersion.description=Show inspections new in IDEA 8
|
||||
action.NewInspectionsInLatestVersion.text=What's new in IDEA 9
|
||||
action.NewInspectionsInLatestVersion.description=Show inspections new in IDEA 9
|
||||
action.RerunFailedTests.text=Rerun Failed Tests
|
||||
action.RerunFailedTests.description=Run only tests that failed/crashed after last run
|
||||
group.AnalyzeJavaMenu.text=Analyze Java Menu
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<orderEntry type="module" module-name="platform-resources-en" />
|
||||
<orderEntry type="library" name="OroMatcher" level="project" />
|
||||
<orderEntry type="module" module-name="annotations" exported="" />
|
||||
<orderEntry type="module" module-name="platform-api" />
|
||||
</component>
|
||||
<component name="copyright">
|
||||
<Base>
|
||||
|
||||
@@ -26,16 +26,13 @@ import com.intellij.openapi.command.CommandAdapter;
|
||||
import com.intellij.openapi.command.CommandEvent;
|
||||
import com.intellij.openapi.command.CommandListener;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.progress.Task;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.ModuleRootEvent;
|
||||
import com.intellij.openapi.roots.ModuleRootListener;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.vcs.ProjectLevelVcsManager;
|
||||
import com.intellij.openapi.vcs.VcsDirectoryMapping;
|
||||
import com.intellij.openapi.vcs.VcsListener;
|
||||
@@ -61,9 +58,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
* shows balloon that notifies user about the problem and offers to correct root mapping.
|
||||
*/
|
||||
public class GitRootTracker implements VcsListener {
|
||||
|
||||
private static final Logger LOG = Logger.getInstance("#git4idea.vfs.GitRootTracker");
|
||||
|
||||
/**
|
||||
* The context project
|
||||
*/
|
||||
@@ -97,6 +91,8 @@ public class GitRootTracker implements VcsListener {
|
||||
*/
|
||||
private final AtomicBoolean myNotificationPosted = new AtomicBoolean(false);
|
||||
|
||||
private final Object myCheckRootsLock = new Object();
|
||||
|
||||
private Notification myNotification;
|
||||
|
||||
/**
|
||||
@@ -159,7 +155,7 @@ public class GitRootTracker implements VcsListener {
|
||||
if (!myRootsInvalidated.compareAndSet(true, false)) {
|
||||
return;
|
||||
}
|
||||
checkRoots(false);
|
||||
scheduleRootsCheck(false);
|
||||
}
|
||||
};
|
||||
CommandProcessor.getInstance().addCommandListener(myCommandListener);
|
||||
@@ -172,14 +168,14 @@ public class GitRootTracker implements VcsListener {
|
||||
if (!myRootsInvalidated.compareAndSet(true, false)) {
|
||||
return;
|
||||
}
|
||||
checkRoots(false);
|
||||
scheduleRootsCheck(false);
|
||||
}
|
||||
};
|
||||
fileManager.addVirtualFileManagerListener(myVirtualFileManagerListener);
|
||||
StartupManager.getInstance(myProject).registerPostStartupActivity(new Runnable() {
|
||||
StartupManager.getInstance(myProject).runWhenProjectIsInitialized(new Runnable() {
|
||||
public void run() {
|
||||
myIsEnabled.set(true);
|
||||
checkRoots(true);
|
||||
scheduleRootsCheck(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -200,10 +196,23 @@ public class GitRootTracker implements VcsListener {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void directoryMappingChanged() {
|
||||
if (myProject.isDisposed()) {
|
||||
scheduleRootsCheck(true);
|
||||
}
|
||||
|
||||
private void scheduleRootsCheck(final boolean rootsChanged) {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode() || ApplicationManager.getApplication().isHeadlessEnvironment()) {
|
||||
doCheckRoots(rootsChanged);
|
||||
return;
|
||||
}
|
||||
checkRoots(true);
|
||||
|
||||
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
|
||||
public void run() {
|
||||
synchronized (myCheckRootsLock) {
|
||||
if (myProject.isDisposed()) return;
|
||||
doCheckRoots(rootsChanged);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -211,63 +220,53 @@ public class GitRootTracker implements VcsListener {
|
||||
*
|
||||
* @param rootsChanged
|
||||
*/
|
||||
private void checkRoots(boolean rootsChanged) {
|
||||
private void doCheckRoots(boolean rootsChanged) {
|
||||
if (!myIsEnabled.get() || (!rootsChanged && !myHasGitRoots.get())) {
|
||||
return;
|
||||
}
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(myProject, "Checking unmapped Git roots...") {
|
||||
@Override
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
public void run() {
|
||||
LOG.info("Checking unmapped Git roots...");
|
||||
long start = System.currentTimeMillis();
|
||||
doCheck();
|
||||
LOG.info("Unmapped Git roots checked in " + (System.currentTimeMillis() - start) + "ms");
|
||||
|
||||
final boolean[] hasInvalidRoots = {false};
|
||||
final HashSet<String> rootSet = new HashSet<String>();
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
public void run() {
|
||||
for (VcsDirectoryMapping m : myVcsManager.getDirectoryMappings()) {
|
||||
if (!m.getVcs().equals(myVcs.getName())) {
|
||||
continue;
|
||||
}
|
||||
});
|
||||
myMulticaster.gitRootsChanged();
|
||||
String path = m.getDirectory();
|
||||
if (path.length() == 0) {
|
||||
VirtualFile baseDir = myProject.getBaseDir();
|
||||
assert baseDir != null;
|
||||
path = baseDir.getPath();
|
||||
}
|
||||
VirtualFile root = lookupFile(path);
|
||||
if (root == null) {
|
||||
hasInvalidRoots[0] = true;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
rootSet.add(root.getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void doCheck() {
|
||||
boolean hasInvalidRoots = false;
|
||||
HashSet<String> rootSet = new HashSet<String>();
|
||||
for (VcsDirectoryMapping m : myVcsManager.getDirectoryMappings()) {
|
||||
if (!m.getVcs().equals(myVcs.getName())) {
|
||||
continue;
|
||||
}
|
||||
String path = m.getDirectory();
|
||||
if (path.length() == 0) {
|
||||
VirtualFile baseDir = myProject.getBaseDir();
|
||||
assert baseDir != null;
|
||||
path = baseDir.getPath();
|
||||
}
|
||||
VirtualFile root = lookupFile(path);
|
||||
if (root == null) {
|
||||
hasInvalidRoots = true;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
rootSet.add(root.getPath());
|
||||
}
|
||||
}
|
||||
if (!hasInvalidRoots && rootSet.isEmpty()) {
|
||||
if (!hasInvalidRoots[0] && rootSet.isEmpty()) {
|
||||
myHasGitRoots.set(false);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
myHasGitRoots.set(true);
|
||||
}
|
||||
if (!hasInvalidRoots) {
|
||||
|
||||
if (!hasInvalidRoots[0]) {
|
||||
// check if roots have a problem
|
||||
loop:
|
||||
for (String path : rootSet) {
|
||||
VirtualFile root = lookupFile(path);
|
||||
VirtualFile gitRoot = GitUtil.gitRootOrNull(root);
|
||||
if (gitRoot == null || hasUnmappedSubroots(root, true, rootSet)) {
|
||||
hasInvalidRoots = true;
|
||||
VirtualFile root = lookupFileInReadAction(path);
|
||||
VirtualFile gitRoot = getGitRootInReadAction(root);
|
||||
if (gitRoot == null || hasUnmappedSubroots(root, rootSet)) {
|
||||
hasInvalidRoots[0] = true;
|
||||
break;
|
||||
}
|
||||
for (String otherPath : rootSet) {
|
||||
@@ -275,46 +274,60 @@ public class GitRootTracker implements VcsListener {
|
||||
continue;
|
||||
}
|
||||
if (otherPath.startsWith(path)) {
|
||||
VirtualFile otherFile = lookupFile(otherPath);
|
||||
VirtualFile otherFile = lookupFileInReadAction(otherPath);
|
||||
if (otherFile == null) {
|
||||
hasInvalidRoots = true;
|
||||
hasInvalidRoots[0] = true;
|
||||
break loop;
|
||||
}
|
||||
VirtualFile otherRoot = GitUtil.gitRootOrNull(otherFile);
|
||||
VirtualFile otherRoot = getGitRootInReadAction(otherFile);
|
||||
if (otherRoot == null || otherRoot == root || otherFile != otherRoot) {
|
||||
hasInvalidRoots = true;
|
||||
hasInvalidRoots[0] = true;
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hasInvalidRoots) {
|
||||
// all roots are correct
|
||||
if (myNotificationPosted.compareAndSet(true, false)) {
|
||||
if (myNotification != null) {
|
||||
if (!myNotification.isExpired()) {
|
||||
myNotification.expire();
|
||||
}
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
if (!hasInvalidRoots[0]) {
|
||||
// all roots are correct
|
||||
if (myNotificationPosted.compareAndSet(true, false)) {
|
||||
if (myNotification != null) {
|
||||
if (!myNotification.isExpired()) {
|
||||
myNotification.expire();
|
||||
}
|
||||
|
||||
myNotification = null;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (myNotificationPosted.compareAndSet(false, true)) {
|
||||
myNotification = new Notification(GIT_INVALID_ROOTS_ID, GitBundle.getString("root.tracker.message.title"),
|
||||
GitBundle.getString("root.tracker.message"),
|
||||
NotificationType.ERROR, new NotificationListener() {
|
||||
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
|
||||
if (fixRoots()) {
|
||||
notification.expire();
|
||||
myNotification = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (myNotificationPosted.compareAndSet(false, true)) {
|
||||
myNotification = new Notification(GIT_INVALID_ROOTS_ID, GitBundle.getString("root.tracker.message.title"),
|
||||
GitBundle.getString("root.tracker.message"), NotificationType.ERROR,
|
||||
new NotificationListener() {
|
||||
public void hyperlinkUpdate(@NotNull Notification notification,
|
||||
@NotNull HyperlinkEvent event) {
|
||||
if (fixRoots()) {
|
||||
notification.expire();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Notifications.Bus.notify(myNotification, myProject);
|
||||
}
|
||||
Notifications.Bus.notify(myNotification, myProject);
|
||||
}
|
||||
myMulticaster.gitRootsChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private VirtualFile getGitRootInReadAction(final VirtualFile root) {
|
||||
return ApplicationManager.getApplication().runReadAction(new Computable<VirtualFile>() {
|
||||
public VirtualFile compute() {
|
||||
return GitUtil.gitRootOrNull(root);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -324,14 +337,27 @@ public class GitRootTracker implements VcsListener {
|
||||
* @param rootSet the mapped root set
|
||||
* @return true if there are unmapped subroots
|
||||
*/
|
||||
private static boolean hasUnmappedSubroots(VirtualFile directory, boolean isRoot, HashSet<String> rootSet) {
|
||||
for (VirtualFile child : directory.getChildren()) {
|
||||
if (child.getName().equals(".git")) {
|
||||
if (isRoot || !child.isDirectory())
|
||||
continue;
|
||||
return !rootSet.contains(directory.getPath());
|
||||
private static boolean hasUnmappedSubroots(final VirtualFile directory, final HashSet<String> rootSet) {
|
||||
VirtualFile[] children = ApplicationManager.getApplication().runReadAction(new Computable<VirtualFile[]>() {
|
||||
public VirtualFile[] compute() {
|
||||
return directory.getChildren();
|
||||
}
|
||||
if (child.isDirectory() && hasUnmappedSubroots(child, false, rootSet)) {
|
||||
});
|
||||
|
||||
for (final VirtualFile child : children) {
|
||||
if (child.getName().equals(".git") || !child.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
boolean hasUnmapped = ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
|
||||
public Boolean compute() {
|
||||
if (child.isValid()) return false;
|
||||
return child.findChild(".git") != null && !rootSet.contains(child.getPath());
|
||||
}
|
||||
});
|
||||
if (hasUnmapped) {
|
||||
return true;
|
||||
}
|
||||
if (hasUnmappedSubroots(child, rootSet)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -440,6 +466,14 @@ public class GitRootTracker implements VcsListener {
|
||||
return myLocalFileSystem.findFileByPath(path);
|
||||
}
|
||||
|
||||
private VirtualFile lookupFileInReadAction(final String path) {
|
||||
return ApplicationManager.getApplication().runReadAction(new Computable<VirtualFile>() {
|
||||
public VirtualFile compute() {
|
||||
return lookupFile(path);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add subroots for the content root
|
||||
*
|
||||
|
||||
+2
-2
@@ -162,11 +162,11 @@ public abstract class MavenBaseModifiableModelsProvider implements MavenModifiab
|
||||
}
|
||||
|
||||
public ModuleRootModel getRootModel(Module module) {
|
||||
return getRootModel(module);
|
||||
return MavenBaseModifiableModelsProvider.this.getRootModel(module);
|
||||
}
|
||||
|
||||
public FacetModel getFacetModel(Module module) {
|
||||
return getFacetModel(module);
|
||||
return MavenBaseModifiableModelsProvider.this.getFacetModel(module);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,10 @@ public class XmlFileHighlighter extends SyntaxHighlighterBase {
|
||||
keys1.put(XmlTokenType.XML_COMMENT_START, XmlHighlighterColors.XML_COMMENT);
|
||||
keys1.put(XmlTokenType.XML_COMMENT_END, XmlHighlighterColors.XML_COMMENT);
|
||||
keys1.put(XmlTokenType.XML_COMMENT_CHARACTERS, XmlHighlighterColors.XML_COMMENT);
|
||||
keys1.put(XmlTokenType.XML_CONDITIONAL_COMMENT_END, XmlHighlighterColors.XML_COMMENT);
|
||||
keys1.put(XmlTokenType.XML_CONDITIONAL_COMMENT_END_START, XmlHighlighterColors.XML_COMMENT);
|
||||
keys1.put(XmlTokenType.XML_CONDITIONAL_COMMENT_START, XmlHighlighterColors.XML_COMMENT);
|
||||
keys1.put(XmlTokenType.XML_CONDITIONAL_COMMENT_START_END, XmlHighlighterColors.XML_COMMENT);
|
||||
|
||||
keys1.put(XmlTokenType.XML_START_TAG_START, XmlHighlighterColors.XML_TAG);
|
||||
keys1.put(XmlTokenType.XML_END_TAG_START, XmlHighlighterColors.XML_TAG);
|
||||
|
||||
@@ -17,7 +17,7 @@ package com.intellij.lexer;
|
||||
|
||||
public class XHtmlHighlightingLexer extends HtmlHighlightingLexer {
|
||||
public XHtmlHighlightingLexer() {
|
||||
this(new XmlLexer());
|
||||
this(new XmlLexer(true));
|
||||
}
|
||||
|
||||
public XHtmlHighlightingLexer(Lexer baseLexer) {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class XHtmlLexer extends HtmlLexer {
|
||||
}
|
||||
|
||||
public XHtmlLexer() {
|
||||
this(new XmlLexer());
|
||||
this(new XmlLexer(true));
|
||||
}
|
||||
|
||||
protected boolean isHtmlTagState(int state) {
|
||||
|
||||
@@ -27,10 +27,15 @@ public class XmlLexer extends MergingLexerAdapter {
|
||||
XmlTokenType.XML_TAG_CHARACTERS,
|
||||
XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN,
|
||||
XmlTokenType.XML_PI_TARGET,
|
||||
XmlTokenType.XML_COMMENT_CHARACTERS,
|
||||
});
|
||||
|
||||
public XmlLexer() {
|
||||
this(new _XmlLexer(new __XmlLexer((Reader)null)));
|
||||
this(false);
|
||||
}
|
||||
|
||||
public XmlLexer(final boolean conditionalCommentsSupport) {
|
||||
this(new _XmlLexer(new __XmlLexer((Reader)null), conditionalCommentsSupport));
|
||||
}
|
||||
|
||||
public XmlLexer(Lexer baseLexer) {
|
||||
|
||||
@@ -23,7 +23,12 @@ public class _XmlLexer extends FlexAdapter {
|
||||
private int myState = __XmlLexer.YYINITIAL;
|
||||
|
||||
public _XmlLexer(final __XmlLexer flexLexer) {
|
||||
this(flexLexer, false);
|
||||
}
|
||||
|
||||
public _XmlLexer(final __XmlLexer flexLexer, final boolean conditionalCommentsSupport) {
|
||||
super(flexLexer);
|
||||
flexLexer.setConditionalCommentsSupport(conditionalCommentsSupport);
|
||||
}
|
||||
|
||||
private void packState() {
|
||||
|
||||
@@ -1,34 +1,18 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* The following code was generated by JFlex 1.4.1 on 9/1/07 12:05 PM */
|
||||
/* The following code was generated by JFlex 1.4.1 on 27.10.09 1:12 */
|
||||
|
||||
/* It's an automatically generated code. Do not modify it. */
|
||||
package com.intellij.lexer;
|
||||
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.psi.xml.XmlElementType;
|
||||
import com.intellij.psi.xml.XmlTokenType;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.xml.*;
|
||||
|
||||
|
||||
/**
|
||||
* This class is a scanner generated by
|
||||
* <a href="http://www.jflex.de/">JFlex</a> 1.4.1
|
||||
* on 9/1/07 12:05 PM from the specification file
|
||||
* <tt>C:/work/Irida/tools/lexer/_XmlLexer.flex</tt>
|
||||
* on 27.10.09 1:12 from the specification file
|
||||
* <tt>C:/IDEA/tools/lexer/_XmlLexer.flex</tt>
|
||||
*/
|
||||
public class __XmlLexer implements FlexLexer {
|
||||
/** initial size of the lookahead buffer */
|
||||
@@ -39,6 +23,7 @@ public class __XmlLexer implements FlexLexer {
|
||||
public static final int ATTR_LIST = 6;
|
||||
public static final int END_TAG = 4;
|
||||
public static final int ATTR_VALUE_DQ = 9;
|
||||
public static final int C_COMMENT_END = 14;
|
||||
public static final int DTD_MARKUP = 8;
|
||||
public static final int CDATA = 12;
|
||||
public static final int ATTR = 7;
|
||||
@@ -48,75 +33,76 @@ public class __XmlLexer implements FlexLexer {
|
||||
public static final int YYINITIAL = 0;
|
||||
public static final int COMMENT = 5;
|
||||
public static final int DOCTYPE = 11;
|
||||
public static final int C_COMMENT_START = 13;
|
||||
public static final int ATTR_VALUE_SQ = 10;
|
||||
|
||||
/**
|
||||
* Translates characters to character classes
|
||||
*/
|
||||
private static final String ZZ_CMAP_PACKED =
|
||||
"\11\0\2\3\1\0\2\3\22\0\1\3\1\13\1\55\1\6\1\4"+
|
||||
"\1\63\1\23\1\56\5\0\1\10\1\7\1\61\12\2\1\11\1\26"+
|
||||
"\1\12\1\62\1\22\1\57\1\0\1\17\1\52\1\15\1\16\1\46"+
|
||||
"\1\42\2\1\1\54\2\1\1\53\1\50\1\1\1\43\1\45\2\1"+
|
||||
"\1\47\1\20\1\51\3\1\1\44\1\1\1\14\1\64\1\21\1\0"+
|
||||
"\1\1\1\0\1\30\1\37\4\42\1\27\4\1\1\24\1\40\1\36"+
|
||||
"\1\32\1\31\1\34\1\1\1\33\1\25\1\35\2\1\1\41\2\1"+
|
||||
"\1\5\1\0\1\60\54\0\1\1\12\0\1\1\4\0\1\1\5\0"+
|
||||
"\27\1\1\0\37\1\1\0\u013f\1\31\0\162\1\4\0\14\1\16\0"+
|
||||
"\5\1\11\0\1\1\213\0\1\1\13\0\1\1\1\0\3\1\1\0"+
|
||||
"\1\1\1\0\24\1\1\0\54\1\1\0\46\1\1\0\5\1\4\0"+
|
||||
"\202\1\10\0\105\1\1\0\46\1\2\0\2\1\6\0\20\1\41\0"+
|
||||
"\46\1\2\0\1\1\7\0\47\1\110\0\33\1\5\0\3\1\56\0"+
|
||||
"\32\1\5\0\13\1\43\0\2\1\1\0\143\1\1\0\1\1\17\0"+
|
||||
"\2\1\7\0\2\1\12\0\3\1\2\0\1\1\20\0\1\1\1\0"+
|
||||
"\36\1\35\0\3\1\60\0\46\1\13\0\1\1\u0152\0\66\1\3\0"+
|
||||
"\1\1\22\0\1\1\7\0\12\1\43\0\10\1\2\0\2\1\2\0"+
|
||||
"\26\1\1\0\7\1\1\0\1\1\3\0\4\1\3\0\1\1\36\0"+
|
||||
"\2\1\1\0\3\1\16\0\2\1\23\0\6\1\4\0\2\1\2\0"+
|
||||
"\26\1\1\0\7\1\1\0\2\1\1\0\2\1\1\0\2\1\37\0"+
|
||||
"\4\1\1\0\1\1\23\0\3\1\20\0\11\1\1\0\3\1\1\0"+
|
||||
"\26\1\1\0\7\1\1\0\2\1\1\0\5\1\3\0\1\1\22\0"+
|
||||
"\1\1\17\0\2\1\43\0\10\1\2\0\2\1\2\0\26\1\1\0"+
|
||||
"\7\1\1\0\2\1\1\0\5\1\3\0\1\1\36\0\2\1\1\0"+
|
||||
"\3\1\17\0\1\1\21\0\1\1\1\0\6\1\3\0\3\1\1\0"+
|
||||
"\4\1\3\0\2\1\1\0\1\1\1\0\2\1\3\0\2\1\3\0"+
|
||||
"\3\1\3\0\10\1\1\0\3\1\113\0\10\1\1\0\3\1\1\0"+
|
||||
"\27\1\1\0\12\1\1\0\5\1\46\0\2\1\43\0\10\1\1\0"+
|
||||
"\3\1\1\0\27\1\1\0\12\1\1\0\5\1\3\0\1\1\40\0"+
|
||||
"\1\1\1\0\2\1\43\0\10\1\1\0\3\1\1\0\27\1\1\0"+
|
||||
"\20\1\46\0\2\1\43\0\22\1\3\0\30\1\1\0\11\1\1\0"+
|
||||
"\1\1\2\0\7\1\72\0\60\1\1\0\2\1\14\0\7\1\72\0"+
|
||||
"\2\1\1\0\1\1\2\0\2\1\1\0\1\1\2\0\1\1\6\0"+
|
||||
"\4\1\1\0\7\1\1\0\3\1\1\0\1\1\1\0\1\1\2\0"+
|
||||
"\2\1\1\0\4\1\1\0\2\1\11\0\1\1\2\0\5\1\1\0"+
|
||||
"\1\1\25\0\2\1\42\0\1\1\77\0\10\1\1\0\42\1\35\0"+
|
||||
"\4\1\164\0\42\1\1\0\5\1\1\0\2\1\45\0\6\1\112\0"+
|
||||
"\46\1\12\0\51\1\7\0\132\1\5\0\104\1\5\0\122\1\6\0"+
|
||||
"\7\1\1\0\77\1\1\0\1\1\1\0\4\1\2\0\7\1\1\0"+
|
||||
"\1\1\1\0\4\1\2\0\47\1\1\0\1\1\1\0\4\1\2\0"+
|
||||
"\37\1\1\0\1\1\1\0\4\1\2\0\7\1\1\0\1\1\1\0"+
|
||||
"\4\1\2\0\7\1\1\0\7\1\1\0\27\1\1\0\37\1\1\0"+
|
||||
"\1\1\1\0\4\1\2\0\7\1\1\0\47\1\1\0\23\1\105\0"+
|
||||
"\125\1\14\0\u026c\1\2\0\10\1\12\0\32\1\5\0\113\1\25\0"+
|
||||
"\15\1\1\0\4\1\16\0\22\1\16\0\22\1\16\0\15\1\1\0"+
|
||||
"\3\1\17\0\64\1\43\0\1\1\4\0\1\1\103\0\130\1\10\0"+
|
||||
"\51\1\127\0\35\1\63\0\36\1\2\0\5\1\u038b\0\154\1\224\0"+
|
||||
"\234\1\4\0\132\1\6\0\26\1\2\0\6\1\2\0\46\1\2\0"+
|
||||
"\6\1\2\0\10\1\1\0\1\1\1\0\1\1\1\0\1\1\1\0"+
|
||||
"\37\1\2\0\65\1\1\0\7\1\1\0\1\1\3\0\3\1\1\0"+
|
||||
"\7\1\3\0\4\1\2\0\6\1\4\0\15\1\5\0\3\1\1\0"+
|
||||
"\7\1\164\0\1\1\15\0\1\1\202\0\1\1\4\0\1\1\2\0"+
|
||||
"\12\1\1\0\1\1\3\0\5\1\6\0\1\1\1\0\1\1\1\0"+
|
||||
"\1\1\1\0\4\1\1\0\3\1\1\0\7\1\3\0\3\1\5\0"+
|
||||
"\5\1\u0ebb\0\2\1\52\0\5\1\5\0\2\1\4\0\126\1\6\0"+
|
||||
"\3\1\1\0\132\1\1\0\4\1\5\0\50\1\4\0\136\1\21\0"+
|
||||
"\30\1\70\0\20\1\u0200\0\u19b6\1\112\0\u51a6\1\132\0\u048d\1\u0773\0"+
|
||||
"\u2ba4\1\u215c\0\u012e\1\2\0\73\1\225\0\7\1\14\0\5\1\5\0"+
|
||||
"\1\1\1\0\12\1\1\0\15\1\1\0\5\1\1\0\1\1\1\0"+
|
||||
"\2\1\1\0\2\1\1\0\154\1\41\0\u016b\1\22\0\100\1\2\0"+
|
||||
"\66\1\50\0\14\1\164\0\5\1\1\0\207\1\44\0\32\1\6\0"+
|
||||
"\32\1\13\0\131\1\3\0\6\1\2\0\6\1\2\0\6\1\2\0"+
|
||||
"\3\1\43\0";
|
||||
"\11\0\2\3\1\0\2\3\22\0\1\3\1\15\1\57\1\6\1\4"+
|
||||
"\1\65\1\16\1\60\1\14\1\14\3\0\1\11\1\10\1\63\12\2"+
|
||||
"\1\12\1\30\1\17\1\64\1\13\1\61\1\0\1\23\1\54\1\21"+
|
||||
"\1\22\1\50\1\44\2\1\1\56\2\1\1\55\1\52\1\1\1\45"+
|
||||
"\1\47\2\1\1\51\1\24\1\53\3\1\1\46\1\1\1\20\1\66"+
|
||||
"\1\25\1\0\1\7\1\0\1\32\1\41\4\44\1\31\4\1\1\26"+
|
||||
"\1\42\1\40\1\34\1\33\1\36\1\1\1\35\1\27\1\37\2\1"+
|
||||
"\1\43\2\1\1\5\1\14\1\62\54\0\1\1\12\0\1\1\4\0"+
|
||||
"\1\1\5\0\27\1\1\0\37\1\1\0\u013f\1\31\0\162\1\4\0"+
|
||||
"\14\1\16\0\5\1\11\0\1\1\213\0\1\1\13\0\1\1\1\0"+
|
||||
"\3\1\1\0\1\1\1\0\24\1\1\0\54\1\1\0\46\1\1\0"+
|
||||
"\5\1\4\0\202\1\10\0\105\1\1\0\46\1\2\0\2\1\6\0"+
|
||||
"\20\1\41\0\46\1\2\0\1\1\7\0\47\1\110\0\33\1\5\0"+
|
||||
"\3\1\56\0\32\1\5\0\13\1\43\0\2\1\1\0\143\1\1\0"+
|
||||
"\1\1\17\0\2\1\7\0\2\1\12\0\3\1\2\0\1\1\20\0"+
|
||||
"\1\1\1\0\36\1\35\0\3\1\60\0\46\1\13\0\1\1\u0152\0"+
|
||||
"\66\1\3\0\1\1\22\0\1\1\7\0\12\1\43\0\10\1\2\0"+
|
||||
"\2\1\2\0\26\1\1\0\7\1\1\0\1\1\3\0\4\1\3\0"+
|
||||
"\1\1\36\0\2\1\1\0\3\1\16\0\2\1\23\0\6\1\4\0"+
|
||||
"\2\1\2\0\26\1\1\0\7\1\1\0\2\1\1\0\2\1\1\0"+
|
||||
"\2\1\37\0\4\1\1\0\1\1\23\0\3\1\20\0\11\1\1\0"+
|
||||
"\3\1\1\0\26\1\1\0\7\1\1\0\2\1\1\0\5\1\3\0"+
|
||||
"\1\1\22\0\1\1\17\0\2\1\43\0\10\1\2\0\2\1\2\0"+
|
||||
"\26\1\1\0\7\1\1\0\2\1\1\0\5\1\3\0\1\1\36\0"+
|
||||
"\2\1\1\0\3\1\17\0\1\1\21\0\1\1\1\0\6\1\3\0"+
|
||||
"\3\1\1\0\4\1\3\0\2\1\1\0\1\1\1\0\2\1\3\0"+
|
||||
"\2\1\3\0\3\1\3\0\10\1\1\0\3\1\113\0\10\1\1\0"+
|
||||
"\3\1\1\0\27\1\1\0\12\1\1\0\5\1\46\0\2\1\43\0"+
|
||||
"\10\1\1\0\3\1\1\0\27\1\1\0\12\1\1\0\5\1\3\0"+
|
||||
"\1\1\40\0\1\1\1\0\2\1\43\0\10\1\1\0\3\1\1\0"+
|
||||
"\27\1\1\0\20\1\46\0\2\1\43\0\22\1\3\0\30\1\1\0"+
|
||||
"\11\1\1\0\1\1\2\0\7\1\72\0\60\1\1\0\2\1\14\0"+
|
||||
"\7\1\72\0\2\1\1\0\1\1\2\0\2\1\1\0\1\1\2\0"+
|
||||
"\1\1\6\0\4\1\1\0\7\1\1\0\3\1\1\0\1\1\1\0"+
|
||||
"\1\1\2\0\2\1\1\0\4\1\1\0\2\1\11\0\1\1\2\0"+
|
||||
"\5\1\1\0\1\1\25\0\2\1\42\0\1\1\77\0\10\1\1\0"+
|
||||
"\42\1\35\0\4\1\164\0\42\1\1\0\5\1\1\0\2\1\45\0"+
|
||||
"\6\1\112\0\46\1\12\0\51\1\7\0\132\1\5\0\104\1\5\0"+
|
||||
"\122\1\6\0\7\1\1\0\77\1\1\0\1\1\1\0\4\1\2\0"+
|
||||
"\7\1\1\0\1\1\1\0\4\1\2\0\47\1\1\0\1\1\1\0"+
|
||||
"\4\1\2\0\37\1\1\0\1\1\1\0\4\1\2\0\7\1\1\0"+
|
||||
"\1\1\1\0\4\1\2\0\7\1\1\0\7\1\1\0\27\1\1\0"+
|
||||
"\37\1\1\0\1\1\1\0\4\1\2\0\7\1\1\0\47\1\1\0"+
|
||||
"\23\1\105\0\125\1\14\0\u026c\1\2\0\10\1\12\0\32\1\5\0"+
|
||||
"\113\1\25\0\15\1\1\0\4\1\16\0\22\1\16\0\22\1\16\0"+
|
||||
"\15\1\1\0\3\1\17\0\64\1\43\0\1\1\4\0\1\1\103\0"+
|
||||
"\130\1\10\0\51\1\127\0\35\1\63\0\36\1\2\0\5\1\u038b\0"+
|
||||
"\154\1\224\0\234\1\4\0\132\1\6\0\26\1\2\0\6\1\2\0"+
|
||||
"\46\1\2\0\6\1\2\0\10\1\1\0\1\1\1\0\1\1\1\0"+
|
||||
"\1\1\1\0\37\1\2\0\65\1\1\0\7\1\1\0\1\1\3\0"+
|
||||
"\3\1\1\0\7\1\3\0\4\1\2\0\6\1\4\0\15\1\5\0"+
|
||||
"\3\1\1\0\7\1\164\0\1\1\15\0\1\1\202\0\1\1\4\0"+
|
||||
"\1\1\2\0\12\1\1\0\1\1\3\0\5\1\6\0\1\1\1\0"+
|
||||
"\1\1\1\0\1\1\1\0\4\1\1\0\3\1\1\0\7\1\3\0"+
|
||||
"\3\1\5\0\5\1\u0ebb\0\2\1\52\0\5\1\5\0\2\1\4\0"+
|
||||
"\126\1\6\0\3\1\1\0\132\1\1\0\4\1\5\0\50\1\4\0"+
|
||||
"\136\1\21\0\30\1\70\0\20\1\u0200\0\u19b6\1\112\0\u51a6\1\132\0"+
|
||||
"\u048d\1\u0773\0\u2ba4\1\u215c\0\u012e\1\2\0\73\1\225\0\7\1\14\0"+
|
||||
"\5\1\5\0\1\1\1\0\12\1\1\0\15\1\1\0\5\1\1\0"+
|
||||
"\1\1\1\0\2\1\1\0\2\1\1\0\154\1\41\0\u016b\1\22\0"+
|
||||
"\100\1\2\0\66\1\50\0\14\1\164\0\5\1\1\0\207\1\44\0"+
|
||||
"\32\1\6\0\32\1\13\0\131\1\3\0\6\1\2\0\6\1\2\0"+
|
||||
"\6\1\2\0\3\1\43\0";
|
||||
|
||||
/**
|
||||
* Translates characters to character classes
|
||||
@@ -129,19 +115,20 @@ public class __XmlLexer implements FlexLexer {
|
||||
private static final int [] ZZ_ACTION = zzUnpackAction();
|
||||
|
||||
private static final String ZZ_ACTION_PACKED_0 =
|
||||
"\1\1\4\0\1\2\7\0\1\1\1\3\1\1\1\4"+
|
||||
"\1\5\1\1\1\5\1\6\1\7\1\5\1\10\1\5"+
|
||||
"\2\11\1\5\4\12\1\13\1\2\1\14\1\15\3\16"+
|
||||
"\1\17\1\20\1\21\3\22\1\14\1\23\3\22\1\5"+
|
||||
"\1\24\2\13\2\5\2\1\2\0\1\25\1\26\6\0"+
|
||||
"\1\6\1\0\1\27\2\11\1\30\1\13\2\0\1\15"+
|
||||
"\5\0\1\31\1\0\2\13\3\0\1\32\4\0\1\33"+
|
||||
"\7\0\1\34\1\35\1\36\1\37\2\13\1\40\1\41"+
|
||||
"\2\0\1\42\2\0\2\13\2\0\2\13\2\0\1\43"+
|
||||
"\1\44\4\0\1\45\1\46";
|
||||
"\1\1\16\0\1\1\1\2\1\1\1\3\1\4\1\1"+
|
||||
"\1\3\1\5\1\6\1\7\2\3\2\10\1\3\4\11"+
|
||||
"\1\12\1\13\1\14\1\13\1\15\1\16\3\17\1\20"+
|
||||
"\1\21\1\22\2\23\1\14\1\23\1\24\3\23\1\25"+
|
||||
"\1\3\2\12\2\3\2\1\1\26\1\13\4\26\1\27"+
|
||||
"\10\0\1\30\1\31\1\5\1\0\1\32\2\10\1\33"+
|
||||
"\1\12\2\0\1\16\5\0\1\34\1\0\2\12\3\0"+
|
||||
"\1\35\1\36\1\0\1\37\12\0\1\40\1\41\1\42"+
|
||||
"\1\43\1\44\2\12\1\45\1\46\2\0\1\47\2\0"+
|
||||
"\2\12\2\0\2\12\2\0\1\50\1\51\4\0\1\52"+
|
||||
"\1\53";
|
||||
|
||||
private static int [] zzUnpackAction() {
|
||||
int [] result = new int[132];
|
||||
int [] result = new int[145];
|
||||
int offset = 0;
|
||||
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -166,26 +153,28 @@ public class __XmlLexer implements FlexLexer {
|
||||
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
|
||||
|
||||
private static final String ZZ_ROWMAP_PACKED_0 =
|
||||
"\0\0\0\65\0\152\0\237\0\324\0\u0109\0\u013e\0\u0173"+
|
||||
"\0\u01a8\0\u01dd\0\u0212\0\u0247\0\u027c\0\u02b1\0\u02e6\0\u031b"+
|
||||
"\0\u0350\0\u0385\0\u03ba\0\u03ef\0\u0424\0\u0459\0\u048e\0\u03ef"+
|
||||
"\0\u04c3\0\u04f8\0\u052d\0\u0562\0\u03ef\0\u048e\0\u0385\0\u0562"+
|
||||
"\0\u0597\0\u05cc\0\u0601\0\u0636\0\u03ef\0\u048e\0\u0385\0\u03ef"+
|
||||
"\0\u03ef\0\u03ef\0\u03ef\0\u066b\0\u048e\0\u0385\0\u03ef\0\u06a0"+
|
||||
"\0\u06d5\0\u070a\0\u073f\0\u03ef\0\u0774\0\u07a9\0\u07de\0\u0813"+
|
||||
"\0\u03ef\0\u0848\0\u087d\0\u08b2\0\u03ef\0\u03ef\0\u08e7\0\u091c"+
|
||||
"\0\u0951\0\u0986\0\u09bb\0\u09f0\0\u0a25\0\u0a5a\0\u03ef\0\u0a8f"+
|
||||
"\0\u0ac4\0\u03ef\0\u0af9\0\u0b2e\0\u0b63\0\u0b98\0\u0bcd\0\u0c02"+
|
||||
"\0\u0c37\0\u0c6c\0\u073f\0\u03ef\0\u0ca1\0\u0cd6\0\u0d0b\0\u07de"+
|
||||
"\0\u0813\0\u0d40\0\u03ef\0\u0d75\0\u0daa\0\u0ddf\0\u0e14\0\u03ef"+
|
||||
"\0\u0e49\0\u0e7e\0\u0eb3\0\u0ee8\0\u0f1d\0\u0f52\0\u0f87\0\u04f8"+
|
||||
"\0\u03ef\0\u03ef\0\u03ef\0\u0fbc\0\u0ff1\0\u03ef\0\u03ef\0\u1026"+
|
||||
"\0\u105b\0\u03ef\0\u1090\0\u10c5\0\u10fa\0\u112f\0\u1164\0\u1199"+
|
||||
"\0\u11ce\0\u1203\0\u1238\0\u126d\0\u0597\0\u0597\0\u12a2\0\u12d7"+
|
||||
"\0\u130c\0\u1341\0\u03ef\0\u03ef";
|
||||
"\0\0\0\67\0\156\0\245\0\334\0\u0113\0\u014a\0\u0181"+
|
||||
"\0\u01b8\0\u01ef\0\u0226\0\u025d\0\u0294\0\u02cb\0\u0302\0\u0339"+
|
||||
"\0\u0370\0\u03a7\0\u03de\0\u0415\0\u044c\0\u0483\0\u04ba\0\u04f1"+
|
||||
"\0\u0483\0\u0528\0\u055f\0\u0596\0\u05cd\0\u0604\0\u0483\0\u03de"+
|
||||
"\0\u0528\0\u0604\0\u063b\0\u0483\0\u0672\0\u06a9\0\u0483\0\u06e0"+
|
||||
"\0\u0483\0\u03de\0\u0528\0\u0483\0\u0483\0\u0483\0\u0483\0\u0717"+
|
||||
"\0\u03de\0\u0528\0\u0483\0\u074e\0\u0785\0\u07bc\0\u0483\0\u07f3"+
|
||||
"\0\u082a\0\u0861\0\u0898\0\u08cf\0\u0483\0\u0906\0\u0483\0\u093d"+
|
||||
"\0\u0974\0\u03de\0\u0528\0\u09ab\0\u0483\0\u09e2\0\u0a19\0\u0a50"+
|
||||
"\0\u0a87\0\u0abe\0\u0af5\0\u0b2c\0\u0b63\0\u0483\0\u0483\0\u0b9a"+
|
||||
"\0\u0bd1\0\u0483\0\u0c08\0\u0c3f\0\u0483\0\u0c76\0\u0cad\0\u0ce4"+
|
||||
"\0\u0d1b\0\u0d52\0\u0d89\0\u0dc0\0\u0df7\0\u07f3\0\u0483\0\u0e2e"+
|
||||
"\0\u0e65\0\u0e9c\0\u0898\0\u08cf\0\u0ed3\0\u0483\0\u0483\0\u0f0a"+
|
||||
"\0\u0483\0\u0f41\0\u0f78\0\u0faf\0\u0fe6\0\u101d\0\u1054\0\u108b"+
|
||||
"\0\u10c2\0\u10f9\0\u1130\0\u0596\0\u0483\0\u0483\0\u0483\0\u0483"+
|
||||
"\0\u1167\0\u119e\0\u0483\0\u0483\0\u11d5\0\u120c\0\u0483\0\u1243"+
|
||||
"\0\u127a\0\u12b1\0\u12e8\0\u131f\0\u1356\0\u138d\0\u13c4\0\u13fb"+
|
||||
"\0\u1432\0\u063b\0\u063b\0\u1469\0\u14a0\0\u14d7\0\u150e\0\u0483"+
|
||||
"\0\u0483";
|
||||
|
||||
private static int [] zzUnpackRowMap() {
|
||||
int [] result = new int[132];
|
||||
int [] result = new int[145];
|
||||
int offset = 0;
|
||||
offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -208,101 +197,107 @@ public class __XmlLexer implements FlexLexer {
|
||||
private static final int [] ZZ_TRANS = zzUnpackTrans();
|
||||
|
||||
private static final String ZZ_TRANS_PACKED_0 =
|
||||
"\3\16\1\17\1\20\1\16\1\20\3\16\1\21\10\16"+
|
||||
"\1\22\40\16\1\23\1\24\1\25\1\24\1\26\6\24"+
|
||||
"\1\27\2\24\4\25\1\24\1\30\1\22\2\25\1\24"+
|
||||
"\26\25\4\24\1\31\4\24\1\32\10\24\1\27\2\24"+
|
||||
"\4\32\2\24\1\22\2\32\1\24\12\32\1\33\13\32"+
|
||||
"\2\24\1\34\5\24\3\35\1\26\6\35\1\36\10\35"+
|
||||
"\1\37\33\35\1\40\5\35\1\24\1\41\1\24\1\26"+
|
||||
"\6\24\1\27\2\24\4\41\1\24\1\30\1\22\2\41"+
|
||||
"\1\24\26\41\10\24\10\42\1\43\54\42\1\24\1\44"+
|
||||
"\1\24\1\26\6\24\1\27\2\24\4\44\2\24\1\22"+
|
||||
"\2\44\1\24\26\44\10\24\3\45\1\26\6\45\1\46"+
|
||||
"\10\45\1\47\31\45\1\50\1\51\3\45\1\52\2\45"+
|
||||
"\12\24\1\27\10\24\1\22\41\24\4\53\1\54\1\53"+
|
||||
"\1\54\3\53\1\55\10\53\1\56\31\53\1\57\5\53"+
|
||||
"\1\60\5\53\1\61\1\53\1\61\3\53\1\55\10\53"+
|
||||
"\1\56\32\53\1\57\4\53\1\62\1\53\1\24\1\41"+
|
||||
"\1\24\1\26\6\24\1\27\1\24\1\63\4\41\1\24"+
|
||||
"\1\64\1\22\2\41\1\24\16\41\1\65\1\41\1\66"+
|
||||
"\5\41\1\67\1\70\6\24\21\71\1\72\43\71\3\16"+
|
||||
"\2\0\1\16\1\0\3\16\1\0\10\16\1\0\40\16"+
|
||||
"\1\23\3\0\1\17\66\0\1\73\72\0\1\74\43\0"+
|
||||
"\1\75\1\0\1\76\4\0\1\77\4\0\1\100\6\0"+
|
||||
"\4\77\3\0\1\101\1\77\1\0\1\101\1\102\3\77"+
|
||||
"\1\103\1\77\1\104\16\77\10\0\3\16\1\0\6\16"+
|
||||
"\1\0\10\16\1\0\40\16\1\23\66\0\2\25\4\0"+
|
||||
"\2\25\1\105\3\0\4\25\3\0\2\25\1\0\26\25"+
|
||||
"\13\0\1\26\74\0\1\106\73\0\1\107\43\0\2\32"+
|
||||
"\4\0\2\32\1\110\3\0\4\32\3\0\2\32\1\0"+
|
||||
"\26\32\11\0\2\32\4\0\2\32\1\110\3\0\4\32"+
|
||||
"\3\0\2\32\1\0\11\32\1\111\14\32\32\0\1\112"+
|
||||
"\43\0\2\41\4\0\2\41\1\113\3\0\4\41\3\0"+
|
||||
"\2\41\1\0\26\41\10\0\10\42\1\114\64\42\1\115"+
|
||||
"\54\42\1\0\2\44\4\0\2\44\1\116\3\0\4\44"+
|
||||
"\3\0\2\44\1\0\26\44\15\0\1\117\141\0\1\120"+
|
||||
"\7\0\1\121\141\0\1\122\2\0\21\123\1\124\33\123"+
|
||||
"\1\125\7\123\1\0\2\41\4\0\2\41\1\113\3\0"+
|
||||
"\4\41\3\0\2\41\1\0\22\41\1\126\3\41\11\0"+
|
||||
"\2\41\4\0\2\41\1\113\3\0\4\41\3\0\2\41"+
|
||||
"\1\0\15\41\1\127\10\41\10\0\55\130\1\53\7\130"+
|
||||
"\56\131\1\53\6\131\21\0\1\132\43\0\12\73\1\0"+
|
||||
"\45\73\1\133\4\73\10\0\1\134\3\0\1\135\1\0"+
|
||||
"\1\136\47\0\2\77\4\0\2\77\1\137\3\0\4\77"+
|
||||
"\3\0\2\77\1\140\26\77\12\0\1\141\36\0\1\142"+
|
||||
"\24\0\2\77\4\0\2\77\1\137\3\0\4\77\3\0"+
|
||||
"\1\77\1\143\1\140\26\77\11\0\2\77\4\0\2\77"+
|
||||
"\1\137\3\0\4\77\3\0\2\77\1\140\2\77\1\144"+
|
||||
"\6\77\1\145\14\77\11\0\2\77\4\0\2\77\1\137"+
|
||||
"\3\0\4\77\3\0\2\77\1\140\6\77\1\146\17\77"+
|
||||
"\11\0\2\77\4\0\2\77\1\137\3\0\4\77\3\0"+
|
||||
"\2\77\1\140\10\77\1\147\15\77\11\0\2\105\4\0"+
|
||||
"\2\105\4\0\4\105\3\0\2\105\1\0\26\105\20\0"+
|
||||
"\1\134\3\0\1\135\51\0\2\110\4\0\2\110\4\0"+
|
||||
"\4\110\3\0\2\110\1\0\26\110\11\0\2\32\4\0"+
|
||||
"\2\32\1\110\3\0\4\32\3\0\1\150\1\32\1\0"+
|
||||
"\26\32\11\0\2\113\4\0\2\113\4\0\4\113\3\0"+
|
||||
"\2\113\1\0\26\113\10\0\10\42\1\0\54\42\22\0"+
|
||||
"\1\151\43\0\2\116\4\0\2\116\4\0\4\116\3\0"+
|
||||
"\2\116\1\0\26\116\10\0\55\117\1\0\2\117\1\152"+
|
||||
"\4\117\55\120\1\0\5\120\1\153\1\120\56\121\1\0"+
|
||||
"\1\121\1\152\4\121\56\122\1\0\4\122\1\153\1\122"+
|
||||
"\55\125\1\123\7\125\1\0\2\41\4\0\2\41\1\113"+
|
||||
"\3\0\4\41\3\0\2\41\1\0\23\41\1\154\2\41"+
|
||||
"\11\0\2\41\4\0\2\41\1\113\3\0\4\41\3\0"+
|
||||
"\2\41\1\0\20\41\1\155\5\41\32\0\1\156\52\0"+
|
||||
"\1\157\71\0\1\160\112\0\1\161\22\0\2\137\4\0"+
|
||||
"\2\137\4\0\4\137\3\0\2\137\1\140\26\137\12\0"+
|
||||
"\1\141\23\0\1\162\40\0\1\163\12\0\3\163\10\0"+
|
||||
"\1\163\6\0\1\163\2\0\1\163\3\0\1\163\3\0"+
|
||||
"\1\163\13\0\2\77\4\0\2\77\1\137\3\0\4\77"+
|
||||
"\3\0\2\77\1\162\26\77\11\0\2\77\4\0\2\77"+
|
||||
"\1\137\3\0\4\77\3\0\2\77\1\140\3\77\1\164"+
|
||||
"\22\77\11\0\2\77\4\0\2\77\1\137\3\0\4\77"+
|
||||
"\3\0\2\77\1\140\2\77\1\143\23\77\11\0\2\77"+
|
||||
"\4\0\2\77\1\137\3\0\4\77\3\0\2\77\1\140"+
|
||||
"\3\77\1\101\22\77\11\0\2\77\4\0\2\77\1\137"+
|
||||
"\3\0\4\77\3\0\2\77\1\140\4\77\1\145\21\77"+
|
||||
"\11\0\2\41\4\0\2\41\1\113\3\0\4\41\3\0"+
|
||||
"\2\41\1\0\24\41\1\165\1\41\11\0\2\41\4\0"+
|
||||
"\2\41\1\113\3\0\3\41\1\166\3\0\2\41\1\0"+
|
||||
"\26\41\26\0\1\167\63\0\1\170\51\0\1\163\12\0"+
|
||||
"\3\163\6\0\1\162\1\0\1\163\6\0\1\163\2\0"+
|
||||
"\1\163\3\0\1\163\3\0\1\163\13\0\2\77\4\0"+
|
||||
"\2\77\1\137\3\0\4\77\3\0\2\77\1\140\4\77"+
|
||||
"\1\143\21\77\11\0\2\41\4\0\2\41\1\113\3\0"+
|
||||
"\4\41\3\0\2\41\1\0\25\41\1\171\11\0\2\41"+
|
||||
"\4\0\2\41\1\113\3\0\4\41\3\0\2\41\1\0"+
|
||||
"\17\41\1\172\6\41\27\0\1\173\65\0\1\174\45\0"+
|
||||
"\2\41\4\0\2\41\1\113\3\0\1\175\3\41\3\0"+
|
||||
"\2\41\1\0\26\41\11\0\2\41\4\0\2\41\1\113"+
|
||||
"\3\0\4\41\3\0\2\41\1\0\21\41\1\176\4\41"+
|
||||
"\30\0\1\177\110\0\1\200\37\0\1\201\112\0\1\202"+
|
||||
"\33\0\1\203\116\0\1\204\16\0";
|
||||
"\3\20\1\21\1\22\1\20\1\22\7\20\1\23\1\24"+
|
||||
"\46\20\1\25\1\26\1\27\1\26\1\30\3\26\1\27"+
|
||||
"\3\26\1\31\2\26\1\23\1\32\1\26\4\27\1\26"+
|
||||
"\2\27\1\26\26\27\4\26\1\33\4\26\1\34\5\26"+
|
||||
"\1\34\6\26\1\23\1\32\1\26\4\34\1\26\2\34"+
|
||||
"\1\26\12\34\1\35\13\34\2\26\1\36\5\26\3\37"+
|
||||
"\1\30\12\37\1\40\1\41\41\37\1\42\5\37\1\26"+
|
||||
"\1\43\1\26\1\30\3\26\1\43\3\26\1\31\2\26"+
|
||||
"\1\23\1\32\1\26\4\43\1\26\2\43\1\26\26\43"+
|
||||
"\10\26\11\44\1\45\5\44\1\46\1\47\46\44\1\26"+
|
||||
"\1\50\1\26\1\30\3\26\1\50\6\26\1\23\1\32"+
|
||||
"\1\26\4\50\1\26\2\50\1\26\26\50\10\26\3\51"+
|
||||
"\1\30\12\51\1\52\1\53\37\51\1\54\1\55\3\51"+
|
||||
"\1\56\2\51\16\26\1\23\1\32\47\26\4\57\1\60"+
|
||||
"\1\57\1\60\7\57\1\61\1\62\37\57\1\63\5\57"+
|
||||
"\1\64\5\57\1\65\1\57\1\65\7\57\1\61\1\62"+
|
||||
"\40\57\1\63\4\57\1\66\1\57\1\26\1\43\1\26"+
|
||||
"\1\30\3\26\1\43\3\26\1\67\2\26\1\23\1\32"+
|
||||
"\1\70\4\43\1\26\2\43\1\26\16\43\1\71\1\43"+
|
||||
"\1\72\5\43\1\73\1\74\6\26\25\75\1\76\41\75"+
|
||||
"\1\77\1\100\7\77\1\101\4\77\1\102\1\103\1\77"+
|
||||
"\4\100\1\104\2\100\1\77\26\100\11\77\1\100\7\77"+
|
||||
"\1\101\4\77\1\102\1\103\1\77\4\100\1\105\2\100"+
|
||||
"\1\77\26\100\10\77\3\20\2\0\1\20\1\0\7\20"+
|
||||
"\2\0\46\20\1\25\3\0\1\21\70\0\1\106\62\0"+
|
||||
"\1\107\4\0\1\110\1\107\11\0\4\107\1\0\1\111"+
|
||||
"\1\107\1\0\1\111\1\112\3\107\1\113\1\107\1\114"+
|
||||
"\16\107\25\0\1\115\43\0\1\116\1\0\1\117\3\0"+
|
||||
"\3\20\1\0\12\20\2\0\46\20\1\25\70\0\2\27"+
|
||||
"\4\0\3\27\1\120\6\0\4\27\1\0\2\27\1\0"+
|
||||
"\26\27\13\0\1\30\100\0\1\121\64\0\1\122\54\0"+
|
||||
"\2\34\4\0\3\34\1\123\6\0\4\34\1\0\2\34"+
|
||||
"\1\0\26\34\11\0\2\34\4\0\3\34\1\123\6\0"+
|
||||
"\4\34\1\0\2\34\1\0\11\34\1\124\14\34\23\0"+
|
||||
"\1\125\54\0\2\43\4\0\3\43\1\126\6\0\4\43"+
|
||||
"\1\0\2\43\1\0\26\43\10\0\11\44\1\127\55\44"+
|
||||
"\15\0\1\130\52\0\2\50\4\0\3\50\1\131\6\0"+
|
||||
"\4\50\1\0\2\50\1\0\26\50\15\0\1\132\145\0"+
|
||||
"\1\133\7\0\1\134\145\0\1\135\2\0\25\136\1\137"+
|
||||
"\31\136\1\140\7\136\1\0\2\43\4\0\3\43\1\126"+
|
||||
"\6\0\4\43\1\0\2\43\1\0\22\43\1\141\3\43"+
|
||||
"\11\0\2\43\4\0\3\43\1\126\6\0\4\43\1\0"+
|
||||
"\2\43\1\0\15\43\1\142\10\43\10\0\57\143\1\57"+
|
||||
"\7\143\60\144\1\57\6\144\25\0\1\145\42\0\3\100"+
|
||||
"\4\0\1\100\3\0\3\100\2\0\4\100\1\0\2\100"+
|
||||
"\1\0\26\100\21\0\1\127\70\0\1\146\53\0\17\106"+
|
||||
"\1\0\42\106\1\147\4\106\1\0\2\107\4\0\3\107"+
|
||||
"\1\150\6\0\4\107\1\0\2\107\1\151\26\107\12\0"+
|
||||
"\1\152\40\0\1\153\24\0\2\107\4\0\3\107\1\150"+
|
||||
"\6\0\4\107\1\0\1\107\1\154\1\151\26\107\11\0"+
|
||||
"\2\107\4\0\3\107\1\150\6\0\4\107\1\0\2\107"+
|
||||
"\1\151\2\107\1\155\6\107\1\156\14\107\11\0\2\107"+
|
||||
"\4\0\3\107\1\150\6\0\4\107\1\0\2\107\1\151"+
|
||||
"\6\107\1\157\17\107\11\0\2\107\4\0\3\107\1\150"+
|
||||
"\6\0\4\107\1\0\2\107\1\151\10\107\1\160\15\107"+
|
||||
"\21\0\1\161\6\0\1\162\1\0\1\163\45\0\2\120"+
|
||||
"\4\0\3\120\7\0\4\120\1\0\2\120\1\0\26\120"+
|
||||
"\21\0\1\161\6\0\1\162\47\0\2\123\4\0\3\123"+
|
||||
"\7\0\4\123\1\0\2\123\1\0\26\123\11\0\2\34"+
|
||||
"\4\0\3\34\1\123\6\0\4\34\1\0\1\164\1\34"+
|
||||
"\1\0\26\34\11\0\2\126\4\0\3\126\7\0\4\126"+
|
||||
"\1\0\2\126\1\0\26\126\23\0\1\165\73\0\1\166"+
|
||||
"\47\0\2\131\4\0\3\131\7\0\4\131\1\0\2\131"+
|
||||
"\1\0\26\131\10\0\57\132\1\0\2\132\1\167\4\132"+
|
||||
"\57\133\1\0\5\133\1\170\1\133\60\134\1\0\1\134"+
|
||||
"\1\167\4\134\60\135\1\0\4\135\1\170\1\135\57\140"+
|
||||
"\1\136\7\140\1\0\2\43\4\0\3\43\1\126\6\0"+
|
||||
"\4\43\1\0\2\43\1\0\23\43\1\171\2\43\11\0"+
|
||||
"\2\43\4\0\3\43\1\126\6\0\4\43\1\0\2\43"+
|
||||
"\1\0\20\43\1\172\5\43\23\0\1\173\54\0\2\150"+
|
||||
"\4\0\3\150\7\0\4\150\1\0\2\150\1\151\26\150"+
|
||||
"\12\0\1\152\25\0\1\174\40\0\1\175\16\0\3\175"+
|
||||
"\6\0\1\175\6\0\1\175\2\0\1\175\3\0\1\175"+
|
||||
"\3\0\1\175\13\0\2\107\4\0\3\107\1\150\6\0"+
|
||||
"\4\107\1\0\2\107\1\174\26\107\11\0\2\107\4\0"+
|
||||
"\3\107\1\150\6\0\4\107\1\0\2\107\1\151\3\107"+
|
||||
"\1\176\22\107\11\0\2\107\4\0\3\107\1\150\6\0"+
|
||||
"\4\107\1\0\2\107\1\151\2\107\1\154\23\107\11\0"+
|
||||
"\2\107\4\0\3\107\1\150\6\0\4\107\1\0\2\107"+
|
||||
"\1\151\3\107\1\111\22\107\11\0\2\107\4\0\3\107"+
|
||||
"\1\150\6\0\4\107\1\0\2\107\1\151\4\107\1\156"+
|
||||
"\21\107\21\0\1\177\76\0\1\200\112\0\1\201\22\0"+
|
||||
"\2\43\4\0\3\43\1\126\6\0\4\43\1\0\2\43"+
|
||||
"\1\0\24\43\1\202\1\43\11\0\2\43\4\0\3\43"+
|
||||
"\1\126\6\0\3\43\1\203\1\0\2\43\1\0\26\43"+
|
||||
"\12\0\1\175\16\0\3\175\4\0\1\174\1\0\1\175"+
|
||||
"\6\0\1\175\2\0\1\175\3\0\1\175\3\0\1\175"+
|
||||
"\13\0\2\107\4\0\3\107\1\150\6\0\4\107\1\0"+
|
||||
"\2\107\1\151\4\107\1\154\21\107\32\0\1\204\65\0"+
|
||||
"\1\205\46\0\2\43\4\0\3\43\1\126\6\0\4\43"+
|
||||
"\1\0\2\43\1\0\25\43\1\206\11\0\2\43\4\0"+
|
||||
"\3\43\1\126\6\0\4\43\1\0\2\43\1\0\17\43"+
|
||||
"\1\207\6\43\33\0\1\210\67\0\1\211\43\0\2\43"+
|
||||
"\4\0\3\43\1\126\6\0\1\212\3\43\1\0\2\43"+
|
||||
"\1\0\26\43\11\0\2\43\4\0\3\43\1\126\6\0"+
|
||||
"\4\43\1\0\2\43\1\0\21\43\1\213\4\43\34\0"+
|
||||
"\1\214\110\0\1\215\43\0\1\216\112\0\1\217\37\0"+
|
||||
"\1\220\116\0\1\221\16\0";
|
||||
|
||||
private static int [] zzUnpackTrans() {
|
||||
int [] result = new int[4982];
|
||||
int [] result = new int[5445];
|
||||
int offset = 0;
|
||||
offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -343,16 +338,17 @@ public class __XmlLexer implements FlexLexer {
|
||||
private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
|
||||
|
||||
private static final String ZZ_ATTRIBUTE_PACKED_0 =
|
||||
"\1\1\4\0\1\1\7\0\6\1\1\11\3\1\1\11"+
|
||||
"\4\1\1\11\7\1\1\11\2\1\4\11\3\1\1\11"+
|
||||
"\4\1\1\11\4\1\1\11\1\1\2\0\2\11\6\0"+
|
||||
"\1\1\1\0\1\11\2\1\1\11\1\1\2\0\1\1"+
|
||||
"\5\0\1\11\1\0\2\1\3\0\1\11\4\0\1\11"+
|
||||
"\7\0\1\1\3\11\2\1\2\11\2\0\1\11\2\0"+
|
||||
"\2\1\2\0\2\1\2\0\2\1\4\0\2\11";
|
||||
"\1\1\16\0\6\1\1\11\2\1\1\11\5\1\1\11"+
|
||||
"\4\1\1\11\2\1\1\11\1\1\1\11\2\1\4\11"+
|
||||
"\3\1\1\11\3\1\1\11\5\1\1\11\1\1\1\11"+
|
||||
"\5\1\1\11\10\0\2\11\1\1\1\0\1\11\2\1"+
|
||||
"\1\11\1\1\2\0\1\1\5\0\1\11\1\0\2\1"+
|
||||
"\3\0\2\11\1\0\1\11\12\0\1\1\4\11\2\1"+
|
||||
"\2\11\2\0\1\11\2\0\2\1\2\0\2\1\2\0"+
|
||||
"\2\1\4\0\2\11";
|
||||
|
||||
private static int [] zzUnpackAttribute() {
|
||||
int [] result = new int[132];
|
||||
int [] result = new int[145];
|
||||
int offset = 0;
|
||||
offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -411,9 +407,23 @@ public class __XmlLexer implements FlexLexer {
|
||||
private boolean zzEOFDone;
|
||||
|
||||
/* user code: */
|
||||
protected IElementType elTokenType = XmlTokenType.XML_DATA_CHARACTERS;
|
||||
protected IElementType elTokenType2 = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN;
|
||||
protected IElementType javaEmbeddedTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN;
|
||||
private IElementType elTokenType = XmlTokenType.XML_DATA_CHARACTERS;
|
||||
private IElementType elTokenType2 = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN;
|
||||
private IElementType javaEmbeddedTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN;
|
||||
private boolean myConditionalCommentsSupport;
|
||||
|
||||
public void setConditionalCommentsSupport(final boolean b) {
|
||||
myConditionalCommentsSupport = b;
|
||||
}
|
||||
|
||||
public void setElTypes(IElementType _elTokenType,IElementType _elTokenType2) {
|
||||
elTokenType = _elTokenType;
|
||||
elTokenType2 = _elTokenType2;
|
||||
}
|
||||
|
||||
public void setJavaEmbeddedType(IElementType _tokenType) {
|
||||
javaEmbeddedTokenType = _tokenType;
|
||||
}
|
||||
|
||||
private int myPrevState = YYINITIAL;
|
||||
|
||||
@@ -456,7 +466,7 @@ public class __XmlLexer implements FlexLexer {
|
||||
char [] map = new char[0x10000];
|
||||
int i = 0; /* index in packed string */
|
||||
int j = 0; /* index in unpacked array */
|
||||
while (i < 1244) {
|
||||
while (i < 1248) {
|
||||
int count = packed.charAt(i++);
|
||||
char value = packed.charAt(i++);
|
||||
do map[j++] = value; while (--count > 0);
|
||||
@@ -485,7 +495,14 @@ public class __XmlLexer implements FlexLexer {
|
||||
|
||||
// For Demetra compatibility
|
||||
public void reset(CharSequence buffer, int initialState){
|
||||
reset(buffer, 0, buffer.length(), initialState);
|
||||
zzBuffer = buffer;
|
||||
zzBufferArray = null;
|
||||
zzCurrentPos = zzMarkedPos = zzStartRead = 0;
|
||||
zzPushbackPos = 0;
|
||||
zzAtEOF = false;
|
||||
zzAtBOL = true;
|
||||
zzEndRead = buffer.length();
|
||||
yybegin(initialState);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -683,161 +700,187 @@ public class __XmlLexer implements FlexLexer {
|
||||
zzMarkedPos = zzMarkedPosL;
|
||||
|
||||
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
|
||||
case 19:
|
||||
case 20:
|
||||
{ yybegin(ATTR_LIST); return XmlTokenType.XML_ATTRIBUTE_VALUE_END_DELIMITER;
|
||||
}
|
||||
case 39: break;
|
||||
case 18:
|
||||
case 44: break;
|
||||
case 19:
|
||||
{ return XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN;
|
||||
}
|
||||
case 40: break;
|
||||
case 36:
|
||||
case 45: break;
|
||||
case 41:
|
||||
{ return XmlTokenType.XML_DOCTYPE_SYSTEM;
|
||||
}
|
||||
case 41: break;
|
||||
case 17:
|
||||
case 46: break;
|
||||
case 18:
|
||||
{ return XmlTokenType.XML_EQ;
|
||||
}
|
||||
case 42: break;
|
||||
case 10:
|
||||
case 47: break;
|
||||
case 9:
|
||||
{ return XmlTokenType.XML_TAG_CHARACTERS;
|
||||
}
|
||||
case 43: break;
|
||||
case 37:
|
||||
case 48: break;
|
||||
case 42:
|
||||
{ yybegin(CDATA); return XmlTokenType.XML_CDATA_START;
|
||||
}
|
||||
case 44: break;
|
||||
case 6:
|
||||
case 49: break;
|
||||
case 5:
|
||||
{ yybegin(ATTR_LIST); pushState(TAG); return XmlTokenType.XML_NAME;
|
||||
}
|
||||
case 45: break;
|
||||
case 22:
|
||||
case 50: break;
|
||||
case 25:
|
||||
{ yybegin(END_TAG); return XmlTokenType.XML_END_TAG_START;
|
||||
}
|
||||
case 46: break;
|
||||
case 26:
|
||||
case 51: break;
|
||||
case 30:
|
||||
{ return elTokenType;
|
||||
}
|
||||
case 47: break;
|
||||
case 11:
|
||||
case 52: break;
|
||||
case 10:
|
||||
{ return XmlTokenType.XML_NAME;
|
||||
}
|
||||
case 48: break;
|
||||
case 35:
|
||||
case 53: break;
|
||||
case 40:
|
||||
{ return XmlTokenType.XML_DOCTYPE_PUBLIC;
|
||||
}
|
||||
case 49: break;
|
||||
case 33:
|
||||
case 54: break;
|
||||
case 39:
|
||||
{ yybegin(COMMENT); return XmlTokenType.XML_COMMENT_START;
|
||||
}
|
||||
case 50: break;
|
||||
case 31:
|
||||
case 55: break;
|
||||
case 13:
|
||||
{ if (myConditionalCommentsSupport) {
|
||||
yybegin(C_COMMENT_START);
|
||||
return XmlTokenType.XML_CONDITIONAL_COMMENT_START;
|
||||
} else return XmlTokenType.XML_COMMENT_CHARACTERS;
|
||||
}
|
||||
case 56: break;
|
||||
case 36:
|
||||
{ return javaEmbeddedTokenType;
|
||||
}
|
||||
case 51: break;
|
||||
case 25:
|
||||
case 57: break;
|
||||
case 28:
|
||||
{ return XmlElementType.XML_MARKUP;
|
||||
}
|
||||
case 52: break;
|
||||
case 28:
|
||||
case 58: break;
|
||||
case 32:
|
||||
{ yybegin(ATTR_LIST); pushState(PROCESSING_INSTRUCTION); return XmlTokenType.XML_NAME;
|
||||
}
|
||||
case 53: break;
|
||||
case 3:
|
||||
case 59: break;
|
||||
case 2:
|
||||
{ return XmlTokenType.XML_REAL_WHITE_SPACE;
|
||||
}
|
||||
case 54: break;
|
||||
case 60: break;
|
||||
case 1:
|
||||
{ return XmlTokenType.XML_DATA_CHARACTERS;
|
||||
}
|
||||
case 55: break;
|
||||
case 61: break;
|
||||
case 23:
|
||||
{ yybegin(COMMENT); return XmlTokenType.XML_CONDITIONAL_COMMENT_END;
|
||||
}
|
||||
case 62: break;
|
||||
case 12:
|
||||
{ return XmlTokenType.XML_BAD_CHARACTER;
|
||||
}
|
||||
case 56: break;
|
||||
case 8:
|
||||
case 63: break;
|
||||
case 7:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_TAG_END;
|
||||
}
|
||||
case 57: break;
|
||||
case 5:
|
||||
case 64: break;
|
||||
case 29:
|
||||
{ yybegin(COMMENT); return XmlTokenType.XML_CONDITIONAL_COMMENT_START_END;
|
||||
}
|
||||
case 65: break;
|
||||
case 3:
|
||||
{ if(yystate() == YYINITIAL){
|
||||
return XmlTokenType.XML_BAD_CHARACTER;
|
||||
}
|
||||
else yybegin(popState()); yypushback(yylength());
|
||||
}
|
||||
case 58: break;
|
||||
case 29:
|
||||
case 66: break;
|
||||
case 33:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_COMMENT_END;
|
||||
}
|
||||
case 59: break;
|
||||
case 67: break;
|
||||
case 4:
|
||||
{ yybegin(TAG); return XmlTokenType.XML_START_TAG_START;
|
||||
}
|
||||
case 60: break;
|
||||
case 23:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_EMPTY_ELEMENT_END;
|
||||
}
|
||||
case 61: break;
|
||||
case 21:
|
||||
{ yybegin(PROCESSING_INSTRUCTION); return XmlTokenType.XML_PI_START;
|
||||
}
|
||||
case 62: break;
|
||||
case 9:
|
||||
{ yybegin(PI_ANY); return XmlTokenType.XML_NAME;
|
||||
}
|
||||
case 63: break;
|
||||
case 13:
|
||||
{ yybegin(ATTR); return XmlTokenType.XML_NAME;
|
||||
}
|
||||
case 64: break;
|
||||
case 14:
|
||||
{ yybegin(ATTR_LIST); yypushback(yylength());
|
||||
}
|
||||
case 65: break;
|
||||
case 20:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_DOCTYPE_END;
|
||||
}
|
||||
case 66: break;
|
||||
case 34:
|
||||
{ return XmlTokenType.XML_CHAR_ENTITY_REF;
|
||||
}
|
||||
case 67: break;
|
||||
case 7:
|
||||
{ return XmlTokenType.XML_WHITE_SPACE;
|
||||
}
|
||||
case 68: break;
|
||||
case 27:
|
||||
{ return XmlTokenType.XML_ENTITY_REF_TOKEN;
|
||||
case 34:
|
||||
{ if (myConditionalCommentsSupport) {
|
||||
yybegin(C_COMMENT_END);
|
||||
return XmlTokenType.XML_CONDITIONAL_COMMENT_END_START;
|
||||
} else return XmlTokenType.XML_COMMENT_CHARACTERS;
|
||||
}
|
||||
case 69: break;
|
||||
case 15:
|
||||
{ yybegin(ATTR_VALUE_DQ); return XmlTokenType.XML_ATTRIBUTE_VALUE_START_DELIMITER;
|
||||
case 26:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_EMPTY_ELEMENT_END;
|
||||
}
|
||||
case 70: break;
|
||||
case 16:
|
||||
{ yybegin(ATTR_VALUE_SQ); return XmlTokenType.XML_ATTRIBUTE_VALUE_START_DELIMITER;
|
||||
case 24:
|
||||
{ yybegin(PROCESSING_INSTRUCTION); return XmlTokenType.XML_PI_START;
|
||||
}
|
||||
case 71: break;
|
||||
case 32:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_CDATA_END;
|
||||
case 8:
|
||||
{ yybegin(PI_ANY); return XmlTokenType.XML_NAME;
|
||||
}
|
||||
case 72: break;
|
||||
case 30:
|
||||
{ return elTokenType2;
|
||||
case 14:
|
||||
{ yybegin(ATTR); return XmlTokenType.XML_NAME;
|
||||
}
|
||||
case 73: break;
|
||||
case 24:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_PI_END;
|
||||
case 15:
|
||||
{ yybegin(ATTR_LIST); yypushback(yylength());
|
||||
}
|
||||
case 74: break;
|
||||
case 38:
|
||||
{ yybegin(DOCTYPE); return XmlTokenType.XML_DOCTYPE_START;
|
||||
case 21:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_DOCTYPE_END;
|
||||
}
|
||||
case 75: break;
|
||||
case 2:
|
||||
{ return XmlTokenType.XML_COMMENT_CHARACTERS;
|
||||
case 38:
|
||||
{ return XmlTokenType.XML_CHAR_ENTITY_REF;
|
||||
}
|
||||
case 76: break;
|
||||
case 6:
|
||||
{ return XmlTokenType.XML_WHITE_SPACE;
|
||||
}
|
||||
case 77: break;
|
||||
case 31:
|
||||
{ return XmlTokenType.XML_ENTITY_REF_TOKEN;
|
||||
}
|
||||
case 78: break;
|
||||
case 16:
|
||||
{ yybegin(ATTR_VALUE_DQ); return XmlTokenType.XML_ATTRIBUTE_VALUE_START_DELIMITER;
|
||||
}
|
||||
case 79: break;
|
||||
case 17:
|
||||
{ yybegin(ATTR_VALUE_SQ); return XmlTokenType.XML_ATTRIBUTE_VALUE_START_DELIMITER;
|
||||
}
|
||||
case 80: break;
|
||||
case 22:
|
||||
{ yybegin(COMMENT); return XmlTokenType.XML_COMMENT_CHARACTERS;
|
||||
}
|
||||
case 81: break;
|
||||
case 37:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_CDATA_END;
|
||||
}
|
||||
case 82: break;
|
||||
case 35:
|
||||
{ return elTokenType2;
|
||||
}
|
||||
case 83: break;
|
||||
case 27:
|
||||
{ yybegin(YYINITIAL); return XmlTokenType.XML_PI_END;
|
||||
}
|
||||
case 84: break;
|
||||
case 43:
|
||||
{ yybegin(DOCTYPE); return XmlTokenType.XML_DOCTYPE_START;
|
||||
}
|
||||
case 85: break;
|
||||
case 11:
|
||||
{ return XmlTokenType.XML_COMMENT_CHARACTERS;
|
||||
}
|
||||
case 86: break;
|
||||
default:
|
||||
if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
|
||||
zzAtEOF = true;
|
||||
|
||||
+10
-13
@@ -16,7 +16,6 @@
|
||||
package com.intellij.psi.impl.source.html;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.lang.html.HTMLLanguage;
|
||||
import com.intellij.lang.injection.MultiHostInjector;
|
||||
import com.intellij.lang.injection.MultiHostRegistrar;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
@@ -39,20 +38,18 @@ public class HtmlConditionalCommentInjector implements MultiHostInjector {
|
||||
if (host instanceof XmlComment) {
|
||||
final ASTNode comment = host.getNode();
|
||||
if (comment != null) {
|
||||
final ASTNode[] conditionalStarts = comment.getChildren(TokenSet.create(XmlTokenType.XML_CONDITIONAL_COMMENT_START_END));
|
||||
if (conditionalStarts.length > 0) {
|
||||
final ASTNode[] conditionalEnds = comment.getChildren(TokenSet.create(XmlTokenType.XML_CONDITIONAL_COMMENT_END_START));
|
||||
if (conditionalEnds.length > 0) {
|
||||
final ASTNode[] endOfEnd = comment.getChildren(TokenSet.create(XmlTokenType.XML_CONDITIONAL_COMMENT_END));
|
||||
if (endOfEnd.length > 0) {
|
||||
final ASTNode conditionalStart = comment.findChildByType(TokenSet.create(XmlTokenType.XML_CONDITIONAL_COMMENT_START_END));
|
||||
if (conditionalStart != null) {
|
||||
final ASTNode conditionalEnd = comment.findChildByType(TokenSet.create(XmlTokenType.XML_CONDITIONAL_COMMENT_END_START));
|
||||
if (conditionalEnd != null) {
|
||||
final ASTNode endOfEnd = comment.findChildByType(TokenSet.create(XmlTokenType.XML_CONDITIONAL_COMMENT_END));
|
||||
if (endOfEnd != null) {
|
||||
final TextRange textRange = host.getTextRange();
|
||||
final int startOffset = textRange.getStartOffset();
|
||||
|
||||
final ASTNode start = conditionalStarts[0];
|
||||
final ASTNode end = conditionalEnds[0];
|
||||
registrar.startInjecting(HTMLLanguage.INSTANCE).addPlace(null, null, (PsiLanguageInjectionHost)host,
|
||||
new TextRange(start.getTextRange().getEndOffset() - startOffset,
|
||||
end.getStartOffset() - startOffset)).doneInjecting();
|
||||
registrar.startInjecting(host.getParent().getLanguage()).addPlace(null, null, (PsiLanguageInjectionHost)host,
|
||||
new TextRange(
|
||||
conditionalStart.getTextRange().getEndOffset() - startOffset,
|
||||
conditionalEnd.getStartOffset() - startOffset)).doneInjecting();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +321,9 @@ public class XmlParsing {
|
||||
advance();
|
||||
while (true) {
|
||||
final IElementType tt = token();
|
||||
if (tt == XML_COMMENT_CHARACTERS) {
|
||||
if (tt == XML_COMMENT_CHARACTERS|| tt == XML_CONDITIONAL_COMMENT_START
|
||||
|| tt == XML_CONDITIONAL_COMMENT_START_END || tt == XML_CONDITIONAL_COMMENT_END_START
|
||||
|| tt == XML_CONDITIONAL_COMMENT_END) {
|
||||
advance();
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user