Search in sources :

Example 6 with ErrorHandler

use of de.catma.ui.module.main.ErrorHandler in project catma by forTEXT.

the class AnalyzeResourcePanel method initData.

private void initData() {
    documentData = new TreeData<>();
    try {
        Collection<SourceDocument> documents = project.getSourceDocuments();
        documentData.addRootItems(documents.stream().map(document -> new DocumentDataItem(document)));
        for (DocumentTreeItem documentDataItem : documentData.getRootItems()) {
            for (AnnotationCollectionReference umcRef : ((DocumentDataItem) documentDataItem).getDocument().getUserMarkupCollectionRefs()) {
                documentData.addItem(documentDataItem, new CollectionDataItem(umcRef, project.hasPermission(project.getRoleForCollection(umcRef.getId()), RBACPermission.COLLECTION_WRITE)));
            }
        }
        documentTree.setDataProvider(new TreeDataProvider<>(documentData));
        Collection<SourceDocument> selectedDocuments = corpus.getSourceDocuments();
        Collection<AnnotationCollectionReference> selectedCollections = corpus.getUserMarkupCollectionRefs();
        documentData.getRootItems().stream().filter(documentItem -> selectedDocuments.contains(((DocumentDataItem) documentItem).getDocument())).forEach(documentTree::select);
        for (DocumentTreeItem documentDataItem : documentData.getRootItems()) {
            List<DocumentTreeItem> collectionItems = documentData.getChildren(documentDataItem);
            for (DocumentTreeItem oneCollection : collectionItems) {
                if (selectedCollections.contains(((CollectionDataItem) oneCollection).getCollectionRef())) {
                    documentTree.getSelectionModel().select(oneCollection);
                }
            }
        }
        documentTree.expand(documentData.getRootItems());
    } catch (Exception e) {
        ((ErrorHandler) UI.getCurrent()).showAndLogError("error loading Project data", e);
    }
}
Also used : SelectionListener(com.vaadin.event.selection.SelectionListener) VerticalLayout(com.vaadin.ui.VerticalLayout) SelectionEvent(com.vaadin.event.selection.SelectionEvent) UI(com.vaadin.ui.UI) ActionGridComponent(de.catma.ui.component.actiongrid.ActionGridComponent) HashSet(java.util.HashSet) EventBus(com.google.common.eventbus.EventBus) Notification(com.vaadin.ui.Notification) ErrorHandler(de.catma.ui.module.main.ErrorHandler) Label(com.vaadin.ui.Label) TreeDataProvider(com.vaadin.data.provider.TreeDataProvider) DocumentChangeEvent(de.catma.project.event.DocumentChangeEvent) TreeGridFactory(de.catma.ui.component.TreeGridFactory) Subscribe(com.google.common.eventbus.Subscribe) SelectionModel(com.vaadin.data.SelectionModel) TreeData(com.vaadin.data.TreeData) AnnotationCollectionReference(de.catma.document.annotation.AnnotationCollectionReference) Project(de.catma.project.Project) Collection(java.util.Collection) Set(java.util.Set) TreeGrid(com.vaadin.ui.TreeGrid) SourceDocument(de.catma.document.source.SourceDocument) ProjectReadyEvent(de.catma.project.event.ProjectReadyEvent) Collectors(java.util.stream.Collectors) MarginInfo(com.vaadin.shared.ui.MarginInfo) ItemClick(com.vaadin.ui.Grid.ItemClick) List(java.util.List) Type(com.vaadin.ui.Notification.Type) ChangeType(de.catma.project.event.ChangeType) Corpus(de.catma.document.corpus.Corpus) Optional(java.util.Optional) HtmlRenderer(com.vaadin.ui.renderers.HtmlRenderer) CollectionChangeEvent(de.catma.project.event.CollectionChangeEvent) Collections(java.util.Collections) RBACPermission(de.catma.rbac.RBACPermission) Grid(com.vaadin.ui.Grid) SourceDocument(de.catma.document.source.SourceDocument) AnnotationCollectionReference(de.catma.document.annotation.AnnotationCollectionReference)

Example 7 with ErrorHandler

use of de.catma.ui.module.main.ErrorHandler in project catma by forTEXT.

the class InspectContentStep method enter.

@Override
public void enter(boolean back) {
    if (back) {
        return;
    }
    @SuppressWarnings("unchecked") Collection<UploadFile> fileList = (Collection<UploadFile>) wizardContext.get(DocumentWizard.WizardContextKey.UPLOAD_FILE_LIST);
    contentPanel.setEnabled(false);
    progressBar.setVisible(true);
    progressBar.setIndeterminate(true);
    final ArrayList<UploadFile> files = new ArrayList<UploadFile>(fileList);
    BackgroundServiceProvider backgroundServiceProvider = (BackgroundServiceProvider) UI.getCurrent();
    backgroundServiceProvider.submit("inspecting-files", new DefaultProgressCallable<List<UploadFile>>() {

        @Override
        public List<UploadFile> call() throws Exception {
            Tika tika = new Tika();
            LanguageDetector languageDetector = LanguageDetector.getDefaultLanguageDetector();
            try {
                languageDetector.loadModels();
            } catch (IOException e) {
                ((ErrorHandler) UI.getCurrent()).showAndLogError("Error loading language detection models!", e);
            }
            for (UploadFile uploadFile : files) {
                if (uploadFile.getMimetype().equals(FileType.XML2.getMimeType())) {
                    XML2ContentHandler contentHandler = new XML2ContentHandler();
                    SourceDocumentInfo sourceDocumentInfo = new SourceDocumentInfo();
                    TechInfoSet techInfoSet = new TechInfoSet(uploadFile.getOriginalFilename(), uploadFile.getMimetype(), uploadFile.getTempFilename());
                    sourceDocumentInfo.setTechInfoSet(techInfoSet);
                    contentHandler.setSourceDocumentInfo(sourceDocumentInfo);
                    contentHandler.load();
                    String content = contentHandler.getContent();
                    LanguageResult languageResult = languageDetector.detect(content);
                    if (languageResult.isReasonablyCertain() && languageResult.getLanguage() != null) {
                        uploadFile.setLanguage(new LanguageItem(new Locale(languageResult.getLanguage())));
                    }
                } else {
                    Metadata metadata = new Metadata();
                    try {
                        try (FileInputStream fis = new FileInputStream(new File(uploadFile.getTempFilename()))) {
                            String content = tika.parseToString(fis, metadata);
                            String contentType = metadata.get(Metadata.CONTENT_TYPE);
                            MediaType mediaType = MediaType.parse(contentType);
                            String charset = mediaType.getParameters().get("charset");
                            if (charset != null) {
                                uploadFile.setCharset(Charset.forName(charset));
                            }
                            LanguageResult languageResult = languageDetector.detect(content);
                            if (languageResult.isReasonablyCertain() && languageResult.getLanguage() != null) {
                                uploadFile.setLanguage(new LanguageItem(new Locale(languageResult.getLanguage())));
                            }
                        }
                    } catch (Exception e) {
                        Logger.getLogger(InspectContentStep.class.getName()).log(Level.SEVERE, String.format("Error inspecting %1$s", uploadFile.getOriginalFilename()), e);
                        String errorMsg = e.getMessage();
                        if ((errorMsg == null) || (errorMsg.trim().isEmpty())) {
                            errorMsg = "";
                        }
                        Notification.show("Error", String.format("Error inspecting content of %1$s! " + "Adding this file to your Project might fail!\n The underlying error message was:\n%2$s", uploadFile.getOriginalFilename(), errorMsg), Type.ERROR_MESSAGE);
                    }
                }
            }
            return files;
        }
    }, new ExecutionListener<List<UploadFile>>() {

        @Override
        public void done(List<UploadFile> result) {
            contentPanel.setEnabled(true);
            progressBar.setVisible(false);
            progressBar.setIndeterminate(false);
            fileList.clear();
            fileList.addAll(result);
            fileDataProvider.refreshAll();
            if (!fileList.isEmpty()) {
                fileList.stream().findFirst().ifPresent(uploadFile -> {
                    fileGrid.select(uploadFile);
                    updatePreview(uploadFile);
                });
            }
            if (stepChangeListener != null) {
                stepChangeListener.stepChanged(InspectContentStep.this);
            }
        }

        @Override
        public void error(Throwable t) {
            Logger.getLogger(InspectContentStep.class.getName()).log(Level.SEVERE, "Error inspecting files", t);
            String errorMsg = t.getMessage();
            if ((errorMsg == null) || (errorMsg.trim().isEmpty())) {
                errorMsg = "";
            }
            Notification.show("Error", String.format("Error inspecting the contents! " + "\n The underlying error message was:\n%1$s", errorMsg), Type.ERROR_MESSAGE);
        }
    });
}
Also used : Locale(java.util.Locale) BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider) DefaultProgressCallable(de.catma.backgroundservice.DefaultProgressCallable) StepChangeListener(de.catma.ui.dialog.wizard.StepChangeListener) VerticalLayout(com.vaadin.ui.VerticalLayout) LanguageItem(de.catma.document.source.LanguageItem) ComboBox(com.vaadin.ui.ComboBox) UI(com.vaadin.ui.UI) LanguageDetector(org.apache.tika.language.detect.LanguageDetector) WizardContext(de.catma.ui.dialog.wizard.WizardContext) MediaType(org.apache.tika.mime.MediaType) ActionGridComponent(de.catma.ui.component.actiongrid.ActionGridComponent) ProgressStep(de.catma.ui.dialog.wizard.ProgressStep) TechInfoSet(de.catma.document.source.TechInfoSet) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) Binding(com.vaadin.data.Binder.Binding) Metadata(org.apache.tika.metadata.Metadata) Charset(java.nio.charset.Charset) CheckBox(com.vaadin.ui.CheckBox) Notification(com.vaadin.ui.Notification) ErrorHandler(de.catma.ui.module.main.ErrorHandler) Locale(java.util.Locale) Label(com.vaadin.ui.Label) ProgressBar(com.vaadin.ui.ProgressBar) TextArea(com.vaadin.ui.TextArea) ListDataProvider(com.vaadin.data.provider.ListDataProvider) ContentMode(com.vaadin.shared.ui.ContentMode) XML2ContentHandler(de.catma.document.source.contenthandler.XML2ContentHandler) ExecutionListener(de.catma.backgroundservice.ExecutionListener) Collection(java.util.Collection) IndexInfoSet(de.catma.document.source.IndexInfoSet) ProgressStepFactory(de.catma.ui.dialog.wizard.ProgressStepFactory) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) Logger(java.util.logging.Logger) File(java.io.File) SourceDocumentInfo(de.catma.document.source.SourceDocumentInfo) List(java.util.List) Type(com.vaadin.ui.Notification.Type) HorizontalLayout(com.vaadin.ui.HorizontalLayout) FileType(de.catma.document.source.FileType) Tika(org.apache.tika.Tika) WizardStep(de.catma.ui.dialog.wizard.WizardStep) Collections(java.util.Collections) LanguageResult(org.apache.tika.language.detect.LanguageResult) Grid(com.vaadin.ui.Grid) SingleOptionInputDialog(de.catma.ui.dialog.SingleOptionInputDialog) LanguageResult(org.apache.tika.language.detect.LanguageResult) SourceDocumentInfo(de.catma.document.source.SourceDocumentInfo) ArrayList(java.util.ArrayList) BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider) Metadata(org.apache.tika.metadata.Metadata) Tika(org.apache.tika.Tika) MediaType(org.apache.tika.mime.MediaType) ArrayList(java.util.ArrayList) List(java.util.List) TechInfoSet(de.catma.document.source.TechInfoSet) ErrorHandler(de.catma.ui.module.main.ErrorHandler) XML2ContentHandler(de.catma.document.source.contenthandler.XML2ContentHandler) IOException(java.io.IOException) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) LanguageDetector(org.apache.tika.language.detect.LanguageDetector) Collection(java.util.Collection) LanguageItem(de.catma.document.source.LanguageItem) File(java.io.File)

Example 8 with ErrorHandler

use of de.catma.ui.module.main.ErrorHandler in project catma by forTEXT.

the class ForkHandler method fork.

public void fork() {
    BackgroundServiceProvider backgroundServiceProvider = (BackgroundServiceProvider) ui;
    BackgroundService backgroundService = backgroundServiceProvider.accuireBackgroundService();
    backgroundService.submit(new DefaultProgressCallable<Void>() {

        @Override
        public Void call() throws Exception {
            final AtomicBoolean cancel = new AtomicBoolean(false);
            for (TagsetDefinition tagset : tagsets) {
                getProgressListener().setProgress("Forking Tagset %1$s into Project %2$s", tagset.getName(), targetProject.getName());
                ui.accessSynchronously(() -> {
                    try {
                        ForkStatus forkStatus = projectManager.forkTagset(tagset, projectId, targetProject);
                        if (forkStatus.isResourceAlreadyExists()) {
                            Notification.show("Info", String.format("The Tagset %1$s is already present in the target Project and cannot be forked!", tagset.getName()), Type.ERROR_MESSAGE);
                        } else if (forkStatus.isTargetHasConflicts()) {
                            Notification.show("Info", String.format("The target Project %1$s has conflicts, please open the Project and resolve the conflicts first!", targetProject.getName()), Type.ERROR_MESSAGE);
                            cancel.set(true);
                        } else if (forkStatus.isTargetNotClean()) {
                            Notification.show("Info", String.format("The target Project %1$s has uncommited changes, please open the Project and commit all changes first!", targetProject.getName()), Type.ERROR_MESSAGE);
                            cancel.set(true);
                        }
                    } catch (Exception e) {
                        ((ErrorHandler) UI.getCurrent()).showAndLogError("Error forking Tagsets", e);
                        cancel.set(true);
                    }
                });
                if (cancel.get()) {
                    return null;
                }
            }
            return null;
        }
    }, executionListener, progressListener);
}
Also used : ForkStatus(de.catma.project.ForkStatus) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TagsetDefinition(de.catma.tag.TagsetDefinition) ErrorHandler(de.catma.ui.module.main.ErrorHandler) BackgroundService(de.catma.backgroundservice.BackgroundService) BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider)

Example 9 with ErrorHandler

use of de.catma.ui.module.main.ErrorHandler in project catma by forTEXT.

the class AnalyzeView method executeSearch.

private void executeSearch(String searchInput, Consumer<QueryResultPanel> addToLayoutFunction) {
    QueryOptions queryOptions = new QueryOptions(new QueryId(searchInput), currentCorpus.getDocumentIds(), currentCorpus.getCollectionIds(), indexInfoSet.getUnseparableCharacterSequences(), indexInfoSet.getUserDefinedSeparatingCharacters(), indexInfoSet.getLocale(), project);
    QueryJob job = new QueryJob(searchInput, queryOptions);
    showProgress(true);
    ((BackgroundServiceProvider) UI.getCurrent()).submit("Searching...", job, new ExecutionListener<QueryResult>() {

        public void done(QueryResult result) {
            try {
                QueryResultPanel queryResultPanel = new QueryResultPanel(project, result, new QueryId(searchInput.toString()), kwicProviderCache, closingPanel -> handleRemoveQueryResultPanel(closingPanel));
                addToLayoutFunction.accept(queryResultPanel);
                addQueryResultPanelSetting(queryResultPanel.getQueryResultPanelSetting());
            } finally {
                showProgress(false);
            }
        }

        public void error(Throwable t) {
            showProgress(false);
            if (t instanceof QueryException) {
                QueryJob.QueryException qe = (QueryJob.QueryException) t;
                String input = qe.getInput();
                int idx = ((RecognitionException) qe.getCause()).charPositionInLine;
                if ((idx >= 0) && (input.length() > idx)) {
                    char character = input.charAt(idx);
                    String message = MessageFormat.format("<html><p>There is something wrong with your query <b>{0}</b> approximately at positon {1} character <b>{2}</b>.</p> <p>If you are unsure about how to construct a query try the Query Builder!</p></html>", input, idx + 1, character);
                    HTMLNotification.show("Info", message, Type.TRAY_NOTIFICATION);
                } else {
                    String message = MessageFormat.format("<html><p>There is something wrong with your query <b>{0}</b>.</p> <p>If you are unsure about how to construct a query try the Query Builder!</p></html>", input);
                    HTMLNotification.show("Info", message, Type.TRAY_NOTIFICATION);
                }
            } else {
                ((ErrorHandler) UI.getCurrent()).showAndLogError("Error during search!", t);
            }
        }
    });
}
Also used : ThemeResource(com.vaadin.server.ThemeResource) Panel(com.vaadin.ui.Panel) BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider) HTMLNotification(de.catma.ui.component.HTMLNotification) LoadingCache(com.google.common.cache.LoadingCache) WordCloudDisplaySettingHandler(de.catma.ui.module.analyze.visualization.vega.WordCloudDisplaySettingHandler) Alignment(com.vaadin.ui.Alignment) UI(com.vaadin.ui.UI) IndexedProject(de.catma.indexer.IndexedProject) KwicProvider(de.catma.indexer.KwicProvider) RecognitionException(org.antlr.runtime.RecognitionException) ErrorHandler(de.catma.ui.module.main.ErrorHandler) Locale(java.util.Locale) SliderPanel(org.vaadin.sliderpanel.SliderPanel) VaadinIcons(com.vaadin.icons.VaadinIcons) QueryId(de.catma.queryengine.QueryId) ProgressBar(com.vaadin.ui.ProgressBar) IconButton(de.catma.ui.component.IconButton) ExecutionListener(de.catma.backgroundservice.ExecutionListener) QueryOptions(de.catma.queryengine.QueryOptions) IndexInfoSet(de.catma.document.source.IndexInfoSet) ClosableTab(de.catma.ui.component.tabbedview.ClosableTab) QueryBuilder(de.catma.ui.module.analyze.querybuilder.QueryBuilder) MarginInfo(com.vaadin.shared.ui.MarginInfo) List(java.util.List) Type(com.vaadin.ui.Notification.Type) Corpus(de.catma.document.corpus.Corpus) RefreshQueryResultPanel(de.catma.ui.module.analyze.queryresultpanel.RefreshQueryResultPanel) Optional(java.util.Optional) SliderPanelBuilder(org.vaadin.sliderpanel.SliderPanelBuilder) QueryJob(de.catma.queryengine.QueryJob) SliderMode(org.vaadin.sliderpanel.client.SliderMode) KwicPanel(de.catma.ui.module.analyze.visualization.kwic.KwicPanel) FormatStyle(java.time.format.FormatStyle) QueryResultPanelSetting(de.catma.ui.module.analyze.queryresultpanel.QueryResultPanelSetting) DoubleTreePanel(de.catma.ui.module.analyze.visualization.doubletree.DoubleTreePanel) QueryResultPanel(de.catma.ui.module.analyze.queryresultpanel.QueryResultPanel) VerticalLayout(com.vaadin.ui.VerticalLayout) LocalDateTime(java.time.LocalDateTime) ComboBox(com.vaadin.ui.ComboBox) WizardContext(de.catma.ui.dialog.wizard.WizardContext) DistributionDisplaySettingHandler(de.catma.ui.module.analyze.visualization.vega.DistributionDisplaySettingHandler) MessageFormat(java.text.MessageFormat) ArrayList(java.util.ArrayList) EventBus(com.google.common.eventbus.EventBus) MaterialTheme(com.github.appreciated.material.MaterialTheme) Notification(com.vaadin.ui.Notification) VegaPanel(de.catma.ui.module.analyze.visualization.vega.VegaPanel) Label(com.vaadin.ui.Label) ClassResource(com.vaadin.server.ClassResource) SaveCancelListener(de.catma.ui.dialog.SaveCancelListener) QueryException(de.catma.queryengine.QueryJob.QueryException) AnalyzeResourcePanel(de.catma.ui.module.analyze.resourcepanel.AnalyzeResourcePanel) ListDataProvider(com.vaadin.data.provider.ListDataProvider) QueryResult(de.catma.queryengine.result.QueryResult) Iterator(java.util.Iterator) Consumer(java.util.function.Consumer) Button(com.vaadin.ui.Button) HorizontalLayout(com.vaadin.ui.HorizontalLayout) TabCaptionChangeListener(de.catma.ui.component.tabbedview.TabCaptionChangeListener) DateTimeFormatter(java.time.format.DateTimeFormatter) QueryTree(de.catma.queryengine.querybuilder.QueryTree) Collections(java.util.Collections) Component(com.vaadin.ui.Component) QueryResult(de.catma.queryengine.result.QueryResult) QueryException(de.catma.queryengine.QueryJob.QueryException) QueryJob(de.catma.queryengine.QueryJob) RefreshQueryResultPanel(de.catma.ui.module.analyze.queryresultpanel.RefreshQueryResultPanel) QueryResultPanel(de.catma.ui.module.analyze.queryresultpanel.QueryResultPanel) QueryId(de.catma.queryengine.QueryId) BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider) QueryOptions(de.catma.queryengine.QueryOptions)

Example 10 with ErrorHandler

use of de.catma.ui.module.main.ErrorHandler in project catma by forTEXT.

the class AnnotationDetailsPanel method initListeners.

private void initListeners() {
    annotationPropertiesChangedListener = new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            TagInstance tagInstance = (TagInstance) evt.getOldValue();
            findAnnotationDataItem(tagInstance.getUuid()).ifPresent(annotationDataItem -> {
                Annotation annotation = annotationDataItem.getAnnotation();
                annotationDetailData.removeItem(annotationDataItem);
                try {
                    addAnnotation(annotation);
                } catch (Exception e) {
                    ((ErrorHandler) UI.getCurrent()).showAndLogError("error adding Annotation", e);
                }
            });
        }
    };
    project.addPropertyChangeListener(RepositoryChangeEvent.propertyValueChanged, annotationPropertiesChangedListener);
    propertyDefinitionChangedListener = new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            refreshAnnotations();
        }
    };
    project.getTagManager().addPropertyChangeListener(TagManagerEvent.userPropertyDefinitionChanged, propertyDefinitionChangedListener);
    tagChangedListener = new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            if ((evt.getOldValue() != null) && (evt.getNewValue() == null)) {
            }
            refreshAnnotations();
        }
    };
    project.getTagManager().addPropertyChangeListener(TagManagerEvent.tagDefinitionChanged, tagChangedListener);
}
Also used : SelectionEvent(com.vaadin.event.selection.SelectionEvent) Alignment(com.vaadin.ui.Alignment) UI(com.vaadin.ui.UI) ConfirmDialog(org.vaadin.dialogs.ConfirmDialog) KwicProvider(de.catma.indexer.KwicProvider) ErrorHandler(de.catma.ui.module.main.ErrorHandler) TreeDataProvider(com.vaadin.data.provider.TreeDataProvider) VaadinIcons(com.vaadin.icons.VaadinIcons) Objects(com.google.common.base.Objects) IconButton(de.catma.ui.component.IconButton) Collection(java.util.Collection) Set(java.util.Set) TagInstance(de.catma.tag.TagInstance) TreeGrid(com.vaadin.ui.TreeGrid) Collectors(java.util.stream.Collectors) List(java.util.List) Type(com.vaadin.ui.Notification.Type) RendererClickEvent(com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent) PropertyChangeListener(java.beans.PropertyChangeListener) TagDefinition(de.catma.tag.TagDefinition) Optional(java.util.Optional) RBACPermission(de.catma.rbac.RBACPermission) PropertyDefinition(de.catma.tag.PropertyDefinition) ClickListener(com.vaadin.ui.Button.ClickListener) DescriptionGenerator(com.vaadin.ui.DescriptionGenerator) VerticalLayout(com.vaadin.ui.VerticalLayout) AnnotationCollectionManager(de.catma.document.annotation.AnnotationCollectionManager) ActionGridComponent(de.catma.ui.component.actiongrid.ActionGridComponent) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Registration(com.vaadin.shared.Registration) Notification(com.vaadin.ui.Notification) Label(com.vaadin.ui.Label) TreeGridFactory(de.catma.ui.component.TreeGridFactory) ButtonRenderer(com.vaadin.ui.renderers.ButtonRenderer) SaveCancelListener(de.catma.ui.dialog.SaveCancelListener) PropertyChangeEvent(java.beans.PropertyChangeEvent) ContentMode(com.vaadin.shared.ui.ContentMode) Property(de.catma.tag.Property) TreeData(com.vaadin.data.TreeData) Project(de.catma.project.Project) RepositoryChangeEvent(de.catma.project.Project.RepositoryChangeEvent) IOException(java.io.IOException) SourceDocument(de.catma.document.source.SourceDocument) Annotation(de.catma.document.annotation.Annotation) Consumer(java.util.function.Consumer) TagManagerEvent(de.catma.tag.TagManager.TagManagerEvent) Button(com.vaadin.ui.Button) HorizontalLayout(com.vaadin.ui.HorizontalLayout) ScrollDestination(com.vaadin.shared.ui.grid.ScrollDestination) HtmlRenderer(com.vaadin.ui.renderers.HtmlRenderer) ErrorHandler(de.catma.ui.module.main.ErrorHandler) PropertyChangeEvent(java.beans.PropertyChangeEvent) PropertyChangeListener(java.beans.PropertyChangeListener) TagInstance(de.catma.tag.TagInstance) Annotation(de.catma.document.annotation.Annotation) IOException(java.io.IOException)

Aggregations

ErrorHandler (de.catma.ui.module.main.ErrorHandler)11 UI (com.vaadin.ui.UI)8 ArrayList (java.util.ArrayList)8 List (java.util.List)8 Label (com.vaadin.ui.Label)6 Notification (com.vaadin.ui.Notification)6 Type (com.vaadin.ui.Notification.Type)6 VerticalLayout (com.vaadin.ui.VerticalLayout)6 SourceDocument (de.catma.document.source.SourceDocument)6 Project (de.catma.project.Project)6 Set (java.util.Set)6 Collectors (java.util.stream.Collectors)6 BackgroundServiceProvider (de.catma.backgroundservice.BackgroundServiceProvider)5 AnnotationCollectionReference (de.catma.document.annotation.AnnotationCollectionReference)5 TagDefinition (de.catma.tag.TagDefinition)5 ActionGridComponent (de.catma.ui.component.actiongrid.ActionGridComponent)5 Collection (java.util.Collection)5 EventBus (com.google.common.eventbus.EventBus)4 ListDataProvider (com.vaadin.data.provider.ListDataProvider)4 VaadinIcons (com.vaadin.icons.VaadinIcons)4