eclipse / dartboard Goto Github PK
View Code? Open in Web Editor NEWDart Plugin for Eclipse
Home Page: https://marketplace.eclipse.org/content/dart-plugin-eclipse-0
License: Eclipse Public License 2.0
Dart Plugin for Eclipse
Home Page: https://marketplace.eclipse.org/content/dart-plugin-eclipse-0
License: Eclipse Public License 2.0
Parsing the pubspec.yaml
can be done using https://github.com/EsotericSoftware/yamlbeans
We need to open a CQ for the new dependency.
I see no code completion for constructor creation. Maybe this is not yet supported by the Dart language server?
class Gerrit {
final String subject;
final String created;
User (this.sub -> [Code completion here returns nothing])
}
!ENTRY org.eclipse.ui 4 0 2019-06-28 12:21:33.412
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
at org.eclipse.dartboard.preference.DartPreferencePage.propertyChange(DartPreferencePage.java:131)
at org.eclipse.jface.preference.FieldEditor.fireValueChanged(FieldEditor.java:350)
at org.eclipse.jface.preference.FieldEditor.fireStateChanged(FieldEditor.java:333)
at org.eclipse.jface.preference.StringFieldEditor.valueChanged(StringFieldEditor.java:496)
at org.eclipse.jface.preference.StringFieldEditor$4.focusLost(StringFieldEditor.java:358)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:147)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1080)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2952)
at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1818)
at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:5152)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4793)
at org.eclipse.swt.widgets.Text.windowProc(Text.java:2528)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4778)
at org.eclipse.swt.internal.win32.OS.PeekMessage(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3542)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:66)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:412)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
at org.eclipse.equinox.launcher.Main.main(Main.java:1441)
The Dart style guide sets some rules (recommendations) on how to format Dart code: https://www.dartlang.org/guides/language/effective-dart/style
We should set these by default from the plugin.
https://ci.eclipse.org/dartboard/
@vogella Please setup the build job for the project on the eclipse CI infrastructure.
I suggest to add a new Dart project wizard and a new Dart file wizard. For Eclipse users is it quite normal to have wizards for creating new elements.
Will probably be EPL.
The "new" context menu in the package explorer should show the option to generate a dart project as well as dart files.
Maybe code labs?
STEPS:
When trying to use the quick access bar in Eclipse, an error is sent by the language server:
[t=1559985255637] LSP4E to org.eclipse.dartboard.server1:
{"jsonrpc":"2.0","id":"9","method":"workspace/symbol","params":{}}
[t=1559985255696] org.eclipse.dartboard.server1 to LSP4E:
{"id":"9","jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params for workspace/symbol"}}
Apparently it's not supported to send workspace/symbol
with an empty params
parameter.
STEPS:
If the user inputs an incorrect Dart location, the Apply button becomes inactive, it remains inactive, even if the user changes something.
Restore Defaults simply remove the user input, please use something more reasonable, like a check which checks the typical install locations and uses the one that could be confirmed.
It would IMHO also beneficial, if you could add a "Validate" button, so that the user can see if the location is valid.
If I create and run a dart file without SDK I would expect a warning / information dialog that this needs to get installed.
If SDK is entered after the file creation no errors/warnings are shown. To test:
Start Eclipse with new workspace and ensure that the Dart SDK is not yet entered for this workspace
Create a new file
void main() {
var bike = new Bicycle(2, 0, 1);
print(bike);
}
-> No errors shows and the SDK is not yet available.
Now enter the SDK location and switch back to the Editor -> still no errors are shown.
The build fails on Java8 due to usage of InputStream.transferTo()
and Optional.ifPresentOrElse()
:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.3.0:compile (default-compile) on project org.eclipse.dartboard: Compilation failure: Compilation failure:
[ERROR] Z:\git\eclipse-dart\org.eclipse.dartboard\src\org\eclipse\dartboard\launch\console\DartConsoleFactory.java:[44]
[ERROR] inputStream.transferTo(outputSteam);
[ERROR] ^^^^^^^^^^
[ERROR] The method transferTo(IOConsoleOutputStream) is undefined for the type InputStream
[ERROR] Z:\git\eclipse-dart\org.eclipse.dartboard\src\org\eclipse\dartboard\preference\DartPreferencePage.java:[86]
[ERROR] optionalVersion.ifPresentOrElse((version) -> {
[ERROR] ^^^^^^^^^^^^^^^
[ERROR] The method ifPresentOrElse((<no type> version) -> {}, () -> {}) is undefined for the type Optional<String>
As discussed, we will setup a nightly update site which is rebuilt every night from master.
Secondly we will add an "integration" build that pushes the results of every commit to a "integration" update site.
We should use the CBI license feature from the foundation. See here https://wiki.eclipse.org/CBI#CBI_license_bundle
The pub package manager should be supported natively.
@jonas-jonas does the language server protocol provide the option to format source code? Would be nice to have that option for Dart files.
When saving a file, the analysis server sends an error indicating that it doesn't support the method textDocumnet/didSave
. According to dart-lang/sdk#36464 it's an error in the client (should be fixed in LSp4E).
The Dart analysis server uses $/analyzerStatus
to indicate the status of the analyzer.
LSP4J does not support this, and throws an error to the console. We should suppress or handle the error accordingly.
Note: that it might be useful to actually have the notification be used for an indicator in the ui (maybe a progress bar at the bottom).
We should add the ability to run a dart project via the run as context menus.
I've started implementing this in b4b22d8.
There should also be the ability to browse for a main file (e.g. main.dart) via a dialog.
Similiar to the java config page:
After adding the SLF4J dependencies there is an error shown on startup:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Logging also doesn't work.
I just read https://jonas-jonas.dev/posts/dartboard-first-update/ and I suggest to update the documentation of Nature creation.
PR for the vogella tutorial is welcome
Looks like the execution of a program happens in the main thread. To test use the following program:
import 'dart:io';
import 'dart:convert';
void main() {
HttpClient()
.getUrl(Uri.parse('https://git.eclipse.org/r/changes/?q=status:open')) // produces a request object
.then((request) => request.close()) // sends the request
.then((response) => response.transform(Utf8Decoder()).listen(print)); // transforms and prints the response
}
Run it and you will see that Eclipse freezes.
As per the dartboard-dev mailing list (thanks @mickaelistria!), we should implement a property tester that tests for either
.dart
filepubspec.yaml
fileto enable project-type specific actions (like launch configs).
For reference:
For use for launch configurations, and other places inside the plugin.
I requested the use of the icon asset with the eclipse foundation.
There should be the ability to run clean up actions via https://github.com/dart-lang/dart_style.
I'm not sure if the cleanup actions of eclipse can be expanded for this, but if that possible we should use it. Otherwise we could also add an External Tool?
Implement a UI for the stagehand CLI utility
Currently, the generic editor is locked on one icon. This can be very confusing for different content types. There were many proposals on changing this to be an extension. Full discussion is here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=513034
This would be a great addition to the feel of Dartboard.
SymbolsModel#getChildren regularly (seemingly random) throws this exception:
!ENTRY org.eclipse.ui.navigator 4 0 2019-01-15 15:38:53.175
!MESSAGE An exception occurred invoking extension: org.eclipse.lsp4e.outline.content for object org.eclipse.jface.viewers.TreePath@36e95b7b
!STACK 0
java.lang.NullPointerException
at org.eclipse.lsp4e.outline.SymbolsModel.getChildren(SymbolsModel.java:138)
at org.eclipse.lsp4e.outline.LSSymbolsContentProvider.hasChildren(LSSymbolsContentProvider.java:240)
at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.hasChildren(SafeDelegateTreeContentProvider.java:115)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.callNormalHasChildren(NavigatorContentServiceContentProvider.java:445)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.access$4(NavigatorContentServiceContentProvider.java:440)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider$3.run(NavigatorContentServiceContentProvider.java:408)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.hasChildren(NavigatorContentServiceContentProvider.java:393)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.hasChildren(NavigatorContentServiceContentProvider.java:437)
at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2158)
at org.eclipse.jface.viewers.TreeViewer.isExpandable(TreeViewer.java:546)
at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2196)
at org.eclipse.jface.viewers.AbstractTreeViewer.optionallyPruneChildren(AbstractTreeViewer.java:2829)
at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2628)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1953)
at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:677)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1959)
at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:677)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1929)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1886)
at org.eclipse.ui.navigator.CommonViewer.internalRefresh(CommonViewer.java:532)
at org.eclipse.jface.viewers.StructuredViewer.lambda$3(StructuredViewer.java:1533)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1449)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:363)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1410)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1533)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:538)
at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:352)
at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:495)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1469)
at org.eclipse.lsp4e.outline.LSSymbolsContentProvider.lambda$2(LSSymbolsContentProvider.java:257)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4906)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4475)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
at org.eclipse.equinox.launcher.Main.main(Main.java:1474)
We should add the EPL 2.0 to every source file. Template:
/*******************************************************************************
* Copyright (c) 2019 vogella GmbH and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Jonas Hungershausen - initial API and implementation
*******************************************************************************/
We should be able to use the copyright tooling from Eclipse for that.
As discussed @jonas-jonas should organize a small hackathon for Dart users. We will ask the Foundation if they can sponsor this.
There should be code snippets for the following actions:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.