Skip to content

Commit

Permalink
Remove code to notify about redundant packages
Browse files Browse the repository at this point in the history
These have been redundant for a long time, we have been warning about 
them for quite some time, and the name of the package has changed; there 
should now be little confusion as to whether these packages are still 
relevant for this one.

References #460
  • Loading branch information
Gert-dev committed Jun 2, 2019
1 parent bc94b2d commit 74b541a
Showing 1 changed file with 0 additions and 166 deletions.
166 changes: 0 additions & 166 deletions lib/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,161 +282,6 @@ const functions = {
return this.getServerManager().install().then(successHandler, failureHandler);
},

/**
* Checks if the php-integrator-navigation package is installed and notifies the user it is obsolete if it is.
*/
notifyAboutRedundantNavigationPackageIfNecessary() {
return atom.packages.onDidActivatePackage(function(packageData) {
let notification;
if (packageData.name !== 'php-integrator-navigation') { return; }

const message =
'It seems you still have the php-integrator-navigation package installed and activated. As of this ' +
'release, it is obsolete and all its functionality is already included in the base package.\n \n' +

'It is recommended to disable or remove it, shall I disable it for you?';

return notification = atom.notifications.addInfo('Serenata - Navigation', {
detail : message,
dismissable : true,

buttons: [
{
text: 'Yes, nuke it',
onDidClick() {
atom.packages.disablePackage('php-integrator-navigation');
return notification.dismiss();
}
},

{
text: 'No, don\'t touch it',
onDidClick() {
return notification.dismiss();
}
}
]
});
});
},

/**
* Checks if the php-integrator-autocomplete-plus package is installed and notifies the user it is obsolete if it
* is.
*/
notifyAboutRedundantAutocompletionPackageIfNecessary() {
return atom.packages.onDidActivatePackage(function(packageData) {
let notification;
if (packageData.name !== 'php-integrator-autocomplete-plus') { return; }

const message =
'It seems you still have the php-integrator-autocomplete-plus package installed and activated. As of ' +
'this release, it is obsolete and all its functionality is already included in the base package.\n \n' +

'It is recommended to disable or remove it, shall I disable it for you?';

return notification = atom.notifications.addInfo('Serenata - Autocompletion', {
detail : message,
dismissable : true,

buttons: [
{
text: 'Yes, nuke it',
onDidClick() {
atom.packages.disablePackage('php-integrator-autocomplete-plus');
return notification.dismiss();
}
},

{
text: 'No, don\'t touch it',
onDidClick() {
return notification.dismiss();
}
}
]
});
});
},

/**
* Checks if the php-integrator-annotations package is installed and notifies the user it is obsolete if it
* is.
*/
notifyAboutRedundantAnnotationsPackageIfNecessary() {
return atom.packages.onDidActivatePackage(function(packageData) {
let notification;
if (packageData.name !== 'php-integrator-annotations') { return; }

const message =
'It seems you still have the php-integrator-annotations package installed and activated. As of ' +
'this release, it is obsolete and all its functionality is already included in the base package.\n \n' +

'It is recommended to disable or remove it, shall I disable it for you?';

return notification = atom.notifications.addInfo('Serenata - Autocompletion', {
detail : message,
dismissable : true,

buttons: [
{
text: 'Yes, nuke it',
onDidClick() {
atom.packages.disablePackage('php-integrator-annotations');
return notification.dismiss();
}
},

{
text: 'No, don\'t touch it',
onDidClick() {
return notification.dismiss();
}
}
]
});
});
},

/**
* Checks if the php-integrator-refactoring package is installed and notifies the user it is obsolete if it
* is.
*/
notifyAboutRedundantRefactoringPackageIfNecessary() {
return atom.packages.onDidActivatePackage(function(packageData) {
let notification;
if (packageData.name !== 'php-integrator-refactoring') { return; }

const message =
'It seems you still have the php-integrator-refactoring package installed and activated. As of ' +
'this release, it is obsolete and all its functionality is already included in the base package.\n \n' +

'It is recommended to disable or remove it, shall I disable it for you?';

return notification = atom.notifications.addInfo('Serenata - Autocompletion', {
detail : message,
dismissable : true,

buttons: [
{
text: 'Yes, nuke it',
onDidClick() {
atom.packages.disablePackage('php-integrator-refactoring');
return notification.dismiss();
}
},

{
text: 'No, don\'t touch it',
onDidClick() {
return notification.dismiss();
}
}
]
});
});
},

/**
* Shows a notification informing about support.
*/
Expand Down Expand Up @@ -528,17 +373,6 @@ const functions = {
});
},

/**
* Does the actual activation.
*/
doActivate() {
// TODO: Extract separate class and refactor into SerenataClient.
this.notifyAboutRedundantNavigationPackageIfNecessary();
this.notifyAboutRedundantAutocompletionPackageIfNecessary();
this.notifyAboutRedundantAnnotationsPackageIfNecessary();
this.notifyAboutRedundantRefactoringPackageIfNecessary();
},

/**
* @return {Service}
*/
Expand Down

0 comments on commit 74b541a

Please sign in to comment.