Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[recommenders-dev] [GSOC 2013] SnipEditor Weekly report

Hello,
I ran into some problems this week.
First of all, I wrote the tests using org.eclipselabs.xtext.utils.unittesting, which seemed very easy. But i could not add the dependency to maven. I've added the dependency and repository of org.eclipselabs.xtext.utils.unittesting in the .pom file from the test-project. It looks like this:
<repositories>
  <repository>
      <id>eclipselabs</id>
     
    </repository>
   </repositories>
  <dependencies>
  <dependency>
  <groupId>org.eclipselabs.xtext.utils</groupId>
  <artifactId>
  org.eclipselabs.xtext.utils.unittesting
  </artifactId>
  <version>0.9.3.201204261440</version>
  <scope>test</scope>
  <optional>true</optional>
  </dependency>
  </dependencies>

Also, i set a plug-in repository in the main .pom :
<pluginRepository>
      <id>org.eclipselabs.xtext.utils.unittesting</id>
    </pluginRepository>

,but i keep getting the following error:
 Failed to execute goal on project org.eclipse.recommenders.snipeditor.tests: Could not resolve dependencies for project org.eclipse.recommenders.snipeditor:org.eclipse.recommenders.snipeditor.tests:eclipse-test-plugin:1.0.0-SNAPSHOT: Failure to find org.eclipselabs.xtext.utils:org.eclipselabs.xtext.utils.unittesting:jar:0.9.3.201204261440 in http://xtext-utils.eclipselabs.org.codespot.com/git.distribution/releases/unittesting-0.9.x/.
I assume there is something wrong with the repository, but i cannot find any maven repository for this plug-in (searched for it on [1] and [2]).
Leaving this behind, I encountered several editor error with the grammar. This were cause by some ambiguities in the grammar( I think it got a little too complex). I've solved this partially, but i still keep getting the following error:
0    [main] ERROR org.eclipse.xtext.ui.editor.model.DocumentPartitioner  - Detected unexpected state in document partitioner. Please file a bug with the following information attached:
Document content after the event was applied:
>>>
//${import( javax.swing.${JFrame})
package p1{
}
class myclass 
{
String ${a} = new String("String");
public static ${someType} ${f}; 
  int [] ${b}=new int[55];   
Integer ${something}=1+2+3+3+4;   
MyClass e=new MyClass(); 
void meth1()  
{
${a}++; 
double newavg;
sum += ( data - avg ) * ( data  -newavg ) ;
${avg} = newavg;
return Math.sqrt( sum / ( n - 1 ) );
 
for(int i=0; i<10; i++)
{
i--;
int a=som; 
 
}
for(${ elemType(someIntSet) } ${freeName(i) } : ${someIntSet})
{
double newavg = avg + ( data - avg ) / ( i + 1 );
sum += ( data - avg ) * ( data  -newavg ) ;
avg = newavg;
return Math.sqrt( sum / ( n - 1 ) );
}
${p} = ${s}.someMethod() ;
//${p} +=1 ;
int ${s} = 0;
${p}=${p}.${s}(${a})+1; 
if(${a}==3 && ${val2}==1 && b) 
{  
return new SomeClass();
}
//Get name of current Java method
String ${freeName(methodName) } = Thread.currentThread().getStackTrace()[1].getMethodName();
}
} <<<
Document event: offset: 724, length: 0, timestamp: 2
text:> <
This errors were a little of a draw-back for this week. I haven't managed to complete the things i planed to. The plan for next week is:
 ->solve the test integration issue
 ->solve remaining grammar-related error
 -> solve the remaining grammar issues (there are name collisions between declarations, e.g.: if you write ${f} the editor will force you to write ${freeName(...)}.)
 
The github repository and updatesite can be found at [3], [4].
Best Regards, Stefan.

Back to the top