ualberta-smr / libcompplugin Goto Github PK
View Code? Open in Web Editor NEWAn IntelliJ plugin for comparing libraries
Home Page: http://smr.cs.ualberta.ca/comparelibraries
License: MIT License
An IntelliJ plugin for comparing libraries
Home Page: http://smr.cs.ualberta.ca/comparelibraries
License: MIT License
Need to decide whether we will keep highlighting a line w/ a package or not.
User should be able to control this. Give them the option to click on "No longer highlight alternatives for X domain" in the interface.
Also, what if they click do not show X domain and then later change their mind, what then? Therefore, should be somewhere to re-set.
Run script from librarycomparisonwebsite repo to obtain updated data and charts
Right now, any existing code that uses the old library will contain build errors after the replacement happens. This is an additional research topic on how to migrate the usages to the new library to reduce the overhead on the developers. Or some smart idea to avoid creating so many build errors.
If we replace import 1 with import 2, we need to add the library dependency corresponding to import 2 in the gradle or maven file, if these files exist.
junit's group is just junit while our stored package name is org.junit so it will not be recognized in build file
Change group to: smr.cs.ualberta.ca
Change name to: libcompplugin
When I initially tried this, the plugin stopped working. So I will need to read about how to do this.
An online source mentioned externally changing the name in the settings.gradle file then rebuilding the project but this also did not work.
Right now, the json responses are actually not recognized as json format b/c there are no surrounding curly brackets at the beginning and end.
Format should be like this:
Libraries {
ALL OF THE JSON, EXACTLY AS IT IS NOW
}
As a workaround, I just added the "Libraries {" and "}" at the beginning and end then the json library im using could recognize it and everything worked out fine.
If we change the API response, it will just remove that one extra step I have in my code.
Comment from PR:
It might be a good idea (perhaps open a new enhancement issue) to move all urls, paths etc to a configuration file. let's say we changed the REST API urls, we shouldn't need to edit or recompile the code.
Insert a commented url with each replacement on the build.gradle file.
The comment will be a URL that takes user to that library entry in the maven repository where they can see info on that library and the version number etc.
This would require these changes:
Right now, it seems we use text-based regular expressions for parsing gradle dependencies. Similar to how we use PSI for Java files, there must be a parser for gradle files that we can use (Given that IntelliJ can recognize incorrect syntax there)
Right now, we rely on direct connections to the MySQL DB on the server. This means we need to store the DB username and password in plaintext in some config files that will get distributed with the app. This is extremely insecure. A better design is to create a REST API (See 1 and 2) on SMR that allows us to access this data.
I have already set up an API end point for getting library information: http://smr.cs.ualberta.ca/comparelibraries/libraries/ (See related PR in the website repo))
Since this is public information and is just a GET from the DB that displays the same info already publicly available on our website, we don't need any authentication for it. The response is a JSON object.
Thus, right now, instead of querying the MySQL DB directly, you will need to process the JSON response from this API. The good news is that I could build this REST API directly using the existing data model in django and using the sqlite DB. This means you no longer need to change things to use MySQL (unless we want to do so for the feedback data to scale better but we should discuss this).
I will still create an end point for pushing the feedback to the server but I'm not sure where the DB model for that feedback data is and whether it makes more sense to make it into a MySQL DB.
Also, are there other queries you do to the DB? For example, i remember there is some counter or date check you do to decide to update the library data in the plugin or not. Basically, I need to know all the queries you currently do to create the minimum set of endpoints needed. For instance, it doesn't make sense to get all the library information if we just need to check the last update date.
Have a system where users can fill in questions themselves about the plugin.
This way we can collect info on what types of programmers they are / occupations / how useful they find the plugin etc.
For this, have to look into any possible privacy issues that may arise.
Must give them the option to NOT give us this info. It is optional.
Look into:
Currently, LibComp does not collect any personally identifying data except the name of projects and files. We do not collect names, emails, phone numbers etc. Developers may ask us to delete their personal data if they provide us with their unique identifier which they have access to. Data is communicated through an encrypted channel (https) to our server, which sits on the university network. We do not collect any of this data unless the user has given us explicit consent.
I believe all these factors make us GDPR compliant, but we need to investigate further if we can claim so. Perhaps there should be a privacy statement added to the repo here?
One issue is that in the case of a breach, we do not have a way to notify our users since we do not collect their emails. We could implement something that communicate with the plugin so that anyone who has the plugin installed gets a notification (e.g., on IDE start, plugin checks for any security breach logged on the server). I'm not sure though if this is really needed since no personal info is collected.
How many participants are needed for a respectable user evaluation?
What if we ask a class of high level computer science students to conduct the study?
I will make it an online questionnaire.
I was testing out the plugin version from PR #38 and I could not see the interaction data on the server. I tried explicitly clicking the send data button as well as just leaving the checkbox checked and trying new feedback, but no new entries appeared in the DB. Do you know what is going on?
LibComp should support maven files similar to how it supports grade.
We still have the problem of colors not showing well in dark mode, but worse the buttons disappear once I start interacting with the dialog (e.g., clicking on the sort up/down buttons):
The color choice is something we can fix later, but @relhajj, do you do anything on sorting that could cause the buttons to disappear?
This wasn't happening before but today when trying libcomp in a gradle file, I got an exception in this line
selectedTerm = valuesInQuotes[0];
as follows:
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at smr.cs.ualberta.libcomp.action.ReplacementAction.detectDependancy(ReplacementAction.java:163)
at smr.cs.ualberta.libcomp.action.ReplacementAction.detectAllOpenEditors(ReplacementAction.java:132)
at smr.cs.ualberta.libcomp.action.ReplacementAction.update(ReplacementAction.java:218)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:177)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:453)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$null$1(ActionUpdater.java:93)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:133)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$2(ActionUpdater.java:94)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:435)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:296)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$19(ActionUpdater.java:275)
at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1712)
It seems that the class name of the action rather than the class name of where the action was taken is recorded:
33 | 2020-06-11 12:54:50.000000 | 14 | IntelliJGradle | smr.cs.ualberta.libcomp.action.ReplacementAction | 6,5 | 6 | 5 | 46 |
smr.cs.ualberta.libcomp.action.ReplacementAction
should be whatever java file or build file the replacement was done in
Currently:
Goal:
I noticed that a lot of charts were missing in the SMR DB so I have updated those, now all of the images found in https://github.com/ualberta-smr/librarycomparisonswebsite/tree/master/charts are also in the SMR DB and are properly labelled.
I have kept this script and will add it to my new PR coming soon so that we can keep it for future use when we need to upload new charts to the DB (it converts to png, labels the images with the name Chart-domainID_metricID
and then uploads into the DB with the proper domain and metric ID labels.
I noticed also that there were some issues on my part for how I am displaying the images in the dialogue. The problem is that some images are being mapped incorrectly due to the ID changes that occurred when we switched to using API's, I will need to re-map images to the dialogue and fix this.
Also, some images are simply non-existent for particular domain-metric pairs. As of now, these charts/images, if missing, cause the button to be disabled so if you click the chart button for a chart that does not exist nothing happens. I think a better thing to do would be to have either a "default image" or even a message with something like "we do not have a chart to display information for this domain/metric at this time".
Have LibComp pull the updated data every month.
Also need to put the feedback data on a server?
Users will have a local copy of the database on the DB, but it will sync up with the server DB with updated data every month.
The plugin cannot be installed in the lastest IntelliJ IDEA (Ultimate Edition).
As explained in the readme, Library_Comparison-1.0.2020.zip
file is not available in the repository, so I tried Library_Comparison-1.0.11.zip
instead!
Library_Comparison-1.0.11.zip
), plugin import fails with the error message of incompatibility issue (see screenshot below).Create/update this repository with a set of comprehensive instructions regarding:
What is LibComp?
How to install LibComp?
How to use LibComp?
Make sure to display the overall score of the library w/ two decimal places. Right now, it is rounding it up in the dialog.
Did you change something in terms of you store/load charts?
I'm not sure if this has something to do with the color mode again, but when I switched to light mode, now the maven dependencies aren't being highlighted (testng should be highlighted):
I can right click and get the library comparisons without a problem, but there's no highlighting.
Also, in maven, it seems that I can right click on any dependency whether we have info about it or not and see the Library comparison option. However, if I choose that option, nothing happens.
Save all feedback locally:
Once permission given OR internet comes back:
Should be able to send feedback as a one-time thing, not necessarily authorizing it for all future uses.
Make more aesthetic
look at existing plugins to suggest alternate designs
looking into including images of trend graphs which we can possibly take from the library comparison website
As I work on enhancements to LibComp, stay on track and continue to update the paper after each task.
Working on paper will take longer for the user study as I will have to analyze the data and re-write the entire section so I set up some time specifically for this task.
Goal: A good publishable paper for a tool tract.
Check how the metrics are presented on the website and try to mimic as much as possible, given the limited space. For example, saying "25 changes" for backwards compatibility is not clear. Maybe avg 25 breaking changes/release? Check for all metrics
Plugin is packaged a an intelliJ 2020 version plugin, so it seems to be incompatible with 2019 (or previous) versions.
Look into a solution so that the plugin works for multiple version of intelliJ
Look into optimizing the way we collect data for the library comparison website (esp. popularity)
First do popularity, but if time permits, look into other metric data collection that could use some optimization.
PROBLEM:
Plugin is installable on intelliJ IDE, but also reach out to JetBrains to look into why the plugin was not put onto the marketplace and finish that up.
Look into the criteria needed to release an installable plugin.
Is there an application? Find and fill if yes.
Look into the timeline for this, how long does it take for it to become an installable plugin?
Current functionality of LibComp:
on project load, all open editors are analyzed and all .java or build.gradle file(s) with relevant libraries will be highlighted accordingly
AFTER project has already loaded, if the user opens a new file in the project and wishes to have LibComp analyze it then have to (1) open the file and then (2) right click with their mouse/mousepad
GOAL/WHAT THIS ISSUE IS FOR:
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.