Search Results

Search found 13 results on 1 pages for 'eclipe'.

Page 1/1 | 1 

  • Eclipe PDE: Jump to line X and highlight it

    - by autobiographer
    A qustion about Eclipse PDE development: I write a small plugin for Eclipse and have the following * an org.eclipse.ui.texteditor.ITextEditor * a line number How can I automatically jump to that line and mark it? It's a pity that the API seems only to support offsets within the document but no line numbers. The best would be: ITextEditor editor = (ITextEditor)IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file, true ); editor.goto(line); editor.markLine(line); It this possible in some way? I did not find a solution

    Read the article

  • Why Eclipse does not see .jar file of a library?

    - by Roman
    I have a java project in which I have "Referenced Libraries". In the "Referenced Libraries" I have a .jar file of a library that I use (I use only one external library). When I try to "Run - Run" the code I have a NullPointerException. From my previous experience I know that it it (very likely) because my code does not see the library. I just started to use Eclipse and it can be the I do not "connect" libraries in a correct way. Should I use some options or additional action to force Eclipse to see the .jar file of the library? ADDED: By the right click on the library I get a drop-down menu in which I see "Build Path". My be I need to do something there?

    Read the article

  • How can i automate eclipe plugin update site generation ??

    - by Ibrahim Cakirlar
    Hi, In our project many eclipse plugins are prepared. I want use tycho to build eclipse plugins automatically. But while executing "mvn install" in an update site project tycho can not find required features. Is there anything wrong?? My Update site --- packaging : eclipse-update-site My feature --- packaging : eclipse-feature my plugin --- packaing : eclipse-plugin How can i use tycho to install my plugin and feature in my target platform (eclipse) ??

    Read the article

  • Learning the base for programming in C

    - by Baltazar Blake
    it's been a while since I think about starting to programming in C and after that to learn programming in C# and I search a lot on google but couldn't find a good guide to start learning base programming in C .However I found that Eclipe integrates very good with Ubuntu and it's a good programming environment for starting to program in C but somebody can give please some links with guides or tell me where can I find the bases for starting to program in C ,and I mean good base because I found a lot of incomplete guides over google ? And if I don't ask to much please give some tips of how to start and how to use Eclipse.Every help will be welcome ,thanks.

    Read the article

  • PHP Dev Tools (Eclipse Plugin) -- Installation Error... help?

    - by Sean Ochoa
    I have already installed WEb Tools, PyDev, and the default Eclipse installation for Ubuntu 10.04 (using "sudo apt-get install eclipe"). I'm now trying to install PHP dev tools plug-in for Eclipse, and I'm getting this error msg: Cannot complete the install because of a conflicting dependency. Software being installed: PDT SDK Feature 1.0.5.v20081126-1856 (org.eclipse.php.sdk_feature.feature.group 1.0.5.v20081126-1856) Software currently installed: Eclipse XML Editors and Tools SDK 3.1.1.v200907161031-7A228DXETAqLQFBNMuHkC8-_dRPY (org.eclipse.wst.xml_sdk.feature.feature.group 3.1.1.v200907161031-7A228DXETAqLQFBNMuHkC8-_dRPY) Only one of the following can be installed at once: Eclipse XML Editors and Tools 3.1.1.v200907161031-7H6FMbDxtkMs9OeLGF98LRhdPKeo (org.eclipse.wst.xml_ui.feature.feature.jar 3.1.1.v200907161031-7H6FMbDxtkMs9OeLGF98LRhdPKeo) Eclipse XML Editors and Tools 3.0.4.v200811211541-7F2ENnCwum8W79A1UYNgSjOcFVJg (org.eclipse.wst.xml_ui.feature.feature.jar 3.0.4.v200811211541-7F2ENnCwum8W79A1UYNgSjOcFVJg) Cannot satisfy dependency: From: PDT SDK Feature 1.0.5.v20081126-1856 (org.eclipse.php.sdk_feature.feature.group 1.0.5.v20081126-1856) To: org.eclipse.php_feature.feature.group [1.0.5.v20081126-1856] Cannot satisfy dependency: From: PDT Feature 1.0.5.v20081126-1856 (org.eclipse.php_feature.feature.group 1.0.5.v20081126-1856) To: org.eclipse.wst.feature.group [3.0.0,4.0.0) Cannot satisfy dependency: From: Web Developer Tools 3.0.4.v200811190840-7A-8l8Qqcz0HyVgjXUE-iuOYZ9ai (org.eclipse.wst.feature.group 3.0.4.v200811190840-7A-8l8Qqcz0HyVgjXUE-iuOYZ9ai) To: org.eclipse.wst.xml_ui.feature.feature.group [3.0.4.v200811211541-7F2ENnCwum8W79A1UYNgSjOcFVJg] Cannot satisfy dependency: From: Eclipse XML Editors and Tools SDK 3.1.1.v200907161031-7A228DXETAqLQFBNMuHkC8-_dRPY (org.eclipse.wst.xml_sdk.feature.feature.group 3.1.1.v200907161031-7A228DXETAqLQFBNMuHkC8-_dRPY) To: org.eclipse.wst.xml_ui.feature.feature.group [3.1.1.v200907161031-7H6FMbDxtkMs9OeLGF98LRhdPKeo] Cannot satisfy dependency: From: Eclipse XML Editors and Tools 3.0.4.v200811211541-7F2ENnCwum8W79A1UYNgSjOcFVJg (org.eclipse.wst.xml_ui.feature.feature.group 3.0.4.v200811211541-7F2ENnCwum8W79A1UYNgSjOcFVJg) To: org.eclipse.wst.xml_ui.feature.feature.jar [3.0.4.v200811211541-7F2ENnCwum8W79A1UYNgSjOcFVJg] Cannot satisfy dependency: From: Eclipse XML Editors and Tools 3.1.1.v200907161031-7H6FMbDxtkMs9OeLGF98LRhdPKeo (org.eclipse.wst.xml_ui.feature.feature.group 3.1.1.v200907161031-7H6FMbDxtkMs9OeLGF98LRhdPKeo) To: org.eclipse.wst.xml_ui.feature.feature.jar [3.1.1.v200907161031-7H6FMbDxtkMs9OeLGF98LRhdPKeo] Any ideas?

    Read the article

  • Eclipse+PyDev+GAE memcache error

    - by bocco
    I've started using Eclipe+PyDev as an environment for developing my first app for Google App Engine. Eclipse is configured according to this tutorial. Everything was working until I start to use memcache. PyDev reports the errors and I don't know how to fix it: Error: Undefined variable from import: get How to fix this? Sure, it is only PyDev checker problem. Code is correct and run on GAE. UPDATE: I'm using PyDev 1.5.0 but experienced the same with 1.4.8. My PYTHONPATH includes (set in Project Properties/PyDev - PYTHONPATH): C:\Program Files\Google\google_appengine C:\Program Files\Google\google_appengine\lib\django C:\Program Files\Google\google_appengine\lib\webob C:\Program Files\Google\google_appengine\lib\yaml\lib UPDATE 2: I took a look at C:\Program Files\Google\google_appengine\google\appengine\api\memcache\__init__.py and found get() is not declared as memcache module function. They use the following trick to do that (I didn't hear about such possibility): _CLIENT = None def setup_client(client_obj): """Sets the Client object instance to use for all module-level methods. Use this method if you want to have customer persistent_id() or persistent_load() functions associated with your client. Args: client_obj: Instance of the memcache.Client object. """ global _CLIENT var_dict = globals() _CLIENT = client_obj var_dict['set_servers'] = _CLIENT.set_servers var_dict['disconnect_all'] = _CLIENT.disconnect_all var_dict['forget_dead_hosts'] = _CLIENT.forget_dead_hosts var_dict['debuglog'] = _CLIENT.debuglog var_dict['get'] = _CLIENT.get var_dict['get_multi'] = _CLIENT.get_multi var_dict['set'] = _CLIENT.set var_dict['set_multi'] = _CLIENT.set_multi var_dict['add'] = _CLIENT.add var_dict['add_multi'] = _CLIENT.add_multi var_dict['replace'] = _CLIENT.replace var_dict['replace_multi'] = _CLIENT.replace_multi var_dict['delete'] = _CLIENT.delete var_dict['delete_multi'] = _CLIENT.delete_multi var_dict['incr'] = _CLIENT.incr var_dict['decr'] = _CLIENT.decr var_dict['flush_all'] = _CLIENT.flush_all var_dict['get_stats'] = _CLIENT.get_stats setup_client(Client()) Hmm... Any idea how to force PyDev to recognize that?

    Read the article

  • Logback: What would cause DEBUG - WARN to append to file but NOT ERROR?

    - by Zombies
    I am running a Java program from Eclipe, and I am using the logback console plugin. I can see the ERROR level statements being appended to console (as well as all of the others). But for some reason my file, which is correctly recieving new DEBUG-WARN statements, is NOT recieving the ERROR level ones. Here is my logback.xml: <consolePlugin /> <appender name="FILE" class="ch.qos.logback.core.FileAppender"> <file>logs/main.log</file> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</Pattern> </layout> </appender> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%msg%n</Pattern> </layout> </appender> <logger name="WebsiteChecker"> <appender-ref ref="FILE" /> </logger> <root> <level value="debug" /> <!--<appender-ref ref="STDOUT" />--> <appender-ref ref="FILE" /> </root> </configuration>

    Read the article

  • Questions related to writing your own file downloader using multiple threads java

    - by Shekhar
    Hello In my current company, i am doing a PoC on how we can write a file downloader utility. We have to use socket programming(TCP/IP) for downloading the files. One of the requirements of the client is that a file(which will be large in size) should be transfered in chunks for example if we have a file of 5Mb size then we can have 5 threads which transfer 1 Mb each. I have written a small application which downloads a file. You can download the eclipe project from http://www.fileflyer.com/view/QM1JSC0 A brief explanation of my classes FileSender.java This class provides the bytes of file. It has a method called sendBytesOfFile(long start,long end, long sequenceNo) which gives the number of bytes. import java.io.File; import java.io.IOException; import java.util.zip.CRC32; import org.apache.commons.io.FileUtils; public class FileSender { private static final String FILE_NAME = "C:\\shared\\test.pdf"; public ByteArrayWrapper sendBytesOfFile(long start,long end, long sequenceNo){ try { File file = new File(FILE_NAME); byte[] fileBytes = FileUtils.readFileToByteArray(file); System.out.println("Size of file is " +fileBytes.length); System.out.println(); System.out.println("Start "+start +" end "+end); byte[] bytes = getByteArray(fileBytes, start, end); ByteArrayWrapper wrapper = new ByteArrayWrapper(bytes, sequenceNo); return wrapper; } catch (IOException e) { throw new RuntimeException(e); } } private byte[] getByteArray(byte[] bytes, long start, long end){ long arrayLength = end-start; System.out.println("Start : "+start +" end : "+end + " Arraylength : "+arrayLength +" length of source array : "+bytes.length); byte[] arr = new byte[(int)arrayLength]; for(int i = (int)start, j =0; i < end;i++,j++){ arr[j] = bytes[i]; } return arr; } public static long fileSize(){ File file = new File(FILE_NAME); return file.length(); } } Second Class is FileReceiver.java - This class receives the file. Small Explanation what this file does This class finds the size of the file to be fetched from Sender Depending upon the size of the file it finds the start and end position till the bytes needs to be read. It starts n number of threads giving each thread start,end, sequence number and a list which all the threads share. Each thread reads the number of bytes and creates a ByteArrayWrapper. ByteArrayWrapper objects are added to the list Then i have while loop which basically make sure that all threads have done their work finally it sorts the list based on the sequence number. then the bytes are joined, and a complete byte array is formed which is converted to a file. Code of File Receiver package com.filedownloader; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.zip.CRC32; import org.apache.commons.io.FileUtils; public class FileReceiver { public static void main(String[] args) { FileReceiver receiver = new FileReceiver(); receiver.receiveFile(); } public void receiveFile(){ long startTime = System.currentTimeMillis(); long numberOfThreads = 10; long filesize = FileSender.fileSize(); System.out.println("File size received "+filesize); long start = filesize/numberOfThreads; List<ByteArrayWrapper> list = new ArrayList<ByteArrayWrapper>(); for(long threadCount =0; threadCount<numberOfThreads ;threadCount++){ FileDownloaderTask task = new FileDownloaderTask(threadCount*start,(threadCount+1)*start,threadCount,list); new Thread(task).start(); } while(list.size() != numberOfThreads){ // this is done so that all the threads should complete their work before processing further. //System.out.println("Waiting for threads to complete. List size "+list.size()); } if(list.size() == numberOfThreads){ System.out.println("All bytes received "+list); Collections.sort(list, new Comparator<ByteArrayWrapper>() { @Override public int compare(ByteArrayWrapper o1, ByteArrayWrapper o2) { long sequence1 = o1.getSequence(); long sequence2 = o2.getSequence(); if(sequence1 < sequence2){ return -1; }else if(sequence1 > sequence2){ return 1; } else{ return 0; } } }); byte[] totalBytes = list.get(0).getBytes(); byte[] firstArr = null; byte[] secondArr = null; for(int i = 1;i<list.size();i++){ firstArr = totalBytes; secondArr = list.get(i).getBytes(); totalBytes = concat(firstArr, secondArr); } System.out.println(totalBytes.length); convertToFile(totalBytes,"c:\\tmp\\test.pdf"); long endTime = System.currentTimeMillis(); System.out.println("Total time taken with "+numberOfThreads +" threads is "+(endTime-startTime)+" ms" ); } } private byte[] concat(byte[] A, byte[] B) { byte[] C= new byte[A.length+B.length]; System.arraycopy(A, 0, C, 0, A.length); System.arraycopy(B, 0, C, A.length, B.length); return C; } private void convertToFile(byte[] totalBytes,String name) { try { FileUtils.writeByteArrayToFile(new File(name), totalBytes); } catch (IOException e) { throw new RuntimeException(e); } } } Code of ByteArrayWrapper package com.filedownloader; import java.io.Serializable; public class ByteArrayWrapper implements Serializable{ private static final long serialVersionUID = 3499562855188457886L; private byte[] bytes; private long sequence; public ByteArrayWrapper(byte[] bytes, long sequenceNo) { this.bytes = bytes; this.sequence = sequenceNo; } public byte[] getBytes() { return bytes; } public long getSequence() { return sequence; } } Code of FileDownloaderTask import java.util.List; public class FileDownloaderTask implements Runnable { private List<ByteArrayWrapper> list; private long start; private long end; private long sequenceNo; public FileDownloaderTask(long start,long end,long sequenceNo,List<ByteArrayWrapper> list) { this.list = list; this.start = start; this.end = end; this.sequenceNo = sequenceNo; } @Override public void run() { ByteArrayWrapper wrapper = new FileSender().sendBytesOfFile(start, end, sequenceNo); list.add(wrapper); } } Questions related to this code 1) Does file downloading becomes fast when multiple threads is used? In this code i am not able to see the benefit. 2) How should i decide how many threads should i create ? 3) Are their any opensource libraries which does that 4) The file which file receiver receives is valid and not corrupted but checksum (i used FileUtils of common-io) does not match. Whats the problem? 5) This code gives out of memory when used with large file(above 100 Mb) i.e. because byte array which is created. How can i avoid? I know this is a very bad code but i have to write this in one day -:). Please suggest any other good way to do this? Thanks Shekhar

    Read the article

1