itemiscreate / solidity-ide Goto Github PK
View Code? Open in Web Editor NEWSolidity plugin for Eclipse
License: Eclipse Public License 1.0
Solidity plugin for Eclipse
License: Eclipse Public License 1.0
modifier name(uint i){
_;
}
Two ways possible, with C++ Style initializer list or with super call that looks like a modifier
contract Base {
uint x;
function Base(uint _x) { x = _x; }
}
contract Derived is Base(7) {
function Derived(uint _y) Base(_y * _y) {
}
}
http://solidity.readthedocs.io/en/develop/contracts.html#arguments-for-base-constructors
The issue code strings used in the validator and quickfix provider shall be defined in a constants interface IssueCodes.
Implement type filtering for FOR declaration
the 'for' type is ignored
All code in the runtime project must be independent from running within Eclipse. The SolidityGlobalScopeProvider depends on ResourcesPlugin to do some URI conversion. This has to be solved differently.
ReferenceExamplesTest fails for some input files with a NoClassDefFoundError for ResourcesPlugin.
This produces a syntax error. Should be fixed in Expressions.
if ( bytes(vote)[0] == aboveChar ) { ...
Apply "Replace with assert" for "throw" in following example:
pragma solidity ^0.4.18 ; contract B { address a; function blabla( ) public { if (true) { throw; } } }
Get following Exception in org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.ExceptionThrowingAcceptor#accept(..)
Constraint: ElementReferenceExpression_ElementReferenceExpression returns ElementReferenceExpression: (
reference=[EObject|ID]
((operationCall?='(' (arguments+=Argument arguments+=Argument*)?) | (arrayAccess?='[' arraySelector+=Expression arraySelector+=Expression*))?
);
Values: arguments(1), reference(1), operationCall(0-1), arrayAccess(0-1)
Semantic Object: SolidityModel.sourceunit[0]->SourceUnit.member[0]->ContractDefinition'B'.features[1]->FunctionDefinition'blabla'.block->Block.statements[0]->ExpressionStatement.expression->ElementReferenceExpression
URI: platform:/resource/test/src/b.sol
Context: Expression returns ElementReferenceExpression```
There are still some language features that don't link to the proper documentation chapter
pragma solidity ^0.4.8;
contract Bug {
function abc() {
}
function abcd(int abc){
int x = abc; // this links to function instead of parameter
}
}
There should be a dedicated New File wizard to create Solidity files. The new file should contain a pragma directive for the current Solidity version.
1eblablabal
Sometimes it is nicer to inject the EPackage or EFactory to simplify the code. For example, in BuildInDeclarations.xtend there are many constructs like
TypesFactory.eINSTANCE.createOperation => [...]
When the factory is injected as extension this would read like:
@Inject extension TypesFactory
...
createOperation => [...]
To facilitate collaboration on the project an Oomph setup should be provided.
DAO constant public mother = DAO(0xbb9bc244d798123fde783fcc1c72d3bb8c189413);
The following warning is reported while translating the language:
error(208): ../com.yakindu.solidity/src-gen/com/yakindu/solidity/parser/antlr/internal/InternalSolidity.g:6785:1: The following token definitions can never be matched because prior tokens match the same input: RULE_HEX,RULE_INT
error(208): ../com.yakindu.solidity.ide/src-gen/com/yakindu/solidity/ide/contentassist/antlr/internal/InternalSolidity.g:16403:1: The following token definitions can never be matched because prior tokens match the same input: RULE_HEX,RULE_INT
Code should be formatted according to style guide.
must be added to base expression language
see
70_contract_detector.sol
Define a product and integrate it into the build.
return uint256(sha3(block.difficulty, block.coinbase, now, lastblockhashused, wager));
The default code folding feature produces too many folding locations. See for example this screenshot:
I think we should provide folding in a first nearing for:
From that set on, we should add more folding if we find reasonable use cases (e.g. very long control statements) and add them by separate feature request.
Add a validation that detects if a function can be marked as 'view' function, provide quickfix
From the docu:
Functions can be declared view in which case they promise not to modify the state.
The following statements are considered modifying the state:
Writing to state variables.
Emitting events..
Creating other contracts.
Using selfdestruct.
Sending Ether via calls.
Calling any function not marked view or pure.
Using low-level calls.
Using inline assembly that contains certain opcodes.
pragma solidity ^0.4.16;
contract C {
function f(uint a, uint b) view returns (uint) {
return a * (b + 42) + now;
}
}
The test plugin does not execute any test yet.
On Mac there is currently no implementation of ISolidityCompiler, thus the Guice config will fail:
1) No implementation for com.yakindu.solidity.compiler.builder.ISolidityCompiler was bound.
at com.yakindu.solidity.compiler.SolidityCompilerModule.configure(SolidityCompilerModule.java:16)
Therefore the injection in SolidityBuilderParticipant must be optional and the registration as well.
We need to create a icon set that screams "solidity"
For multi-line errors the highlighted area is to big.
E.g. errors/warnings that apply for functions should not highlight the entire block, but the function declaration instead.
In some tools (eg Remix) it is possible to import "common" contracts such as "mortal", or "owned"
See:
http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html?highlight=mortal#create-a-contract-that-can-be-killed-and-return-funds
and
http://solidity.readthedocs.io/en/develop/contracts.html?highlight=mortal#function-modifiers
we should also make this possible
Due to different units of ether the values may exeed the int limit
The getter's name is the variable's name. So in
contract foo {
int public bar;
}
You can access it through someFooInstance.bar()
.
nodes in outline should either be removed or meaningful named where possible
The solidity version is currently hard coded in the quick fix provider, which is a bad place. Better define a Guice binding in the runtime module and inject it there. Other places can make use of the same injection.
This is missing in base expressions and has to be added to yakindu base
missing keyword "memory"
see http://solidity.readthedocs.io/en/develop/types.html?highlight=memory#reference-types
Add a validation that states if a function can be marked as 'pure'
Pure Functions
Functions can be declared pure in which case they promise not to read from or modify the state.
In addition to the list of state modifying statements explained above, the following are considered reading from the state:
Reading from state variables.
Accessing this.balance or
contract C {
function f(uint a, uint b) pure returns (uint) {
return a * (b + 42);
}
}
The following example is valid code, that should result in a single compiler warning "Naming function type return parameters is deprecated.". We currently don't support functions as parameter
pragma solidity ^0.4.18;
contract test{
function reduce(uint[] memory self, function (uint x, uint y) returns (uint) f) internal returns (uint r)
{
r = self[0];
for (uint i = 1; i < self.length; i++) {
r = f(r, self[i]);
}
}
}
Example:
`
contract TokenInterface {
string name;
}
contract Token is TokenInterface {
function Token (string _name) {
name= _name;
}
}
`
results in
Couldn't resolve reference to EObject 'name'
bool returnval = miner.send(1000000000000000000);
Currently hyperlinks to build-in operations like assert are shown, but have no effect since there is no source for them to link to. Thus they should be disabled.
BuildInDeclarations is quite verbose. This can be simplified with some additional builder methods.
This project is obsolete since the product build already produces a p2 repository
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.